mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Updated build and publish setup for unpkg deployment
refs https://github.com/TryGhost/members.js/issues/12 - Updates package name and add umd/unpkg setup in `package.json` - Updated webpack config to publish minified bundle at `umd/memebrs.min.js` - Updated .gitignore to remove build folders
This commit is contained in:
parent
89a1cab4c1
commit
028139a0e1
3 changed files with 14 additions and 5 deletions
5
ghost/portal/.gitignore
vendored
5
ghost/portal/.gitignore
vendored
|
@ -68,8 +68,9 @@ typings/
|
||||||
# OSX
|
# OSX
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
# Membersjs Custom
|
# Membersjs build folders
|
||||||
build
|
umd/
|
||||||
|
build/
|
||||||
|
|
||||||
## config
|
## config
|
||||||
.env.local
|
.env.local
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
{
|
{
|
||||||
"name": "membersjs",
|
"name": "@tryghost/members-js",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "git@github.com:TryGhost/membersjs.git",
|
"repository": "git@github.com:TryGhost/membersjs.git",
|
||||||
"author": "Ghost Foundation",
|
"author": "Ghost Foundation",
|
||||||
|
"unpkg": "umd/members.min.js",
|
||||||
|
"files": [
|
||||||
|
"umd/",
|
||||||
|
"LICENSE",
|
||||||
|
"README.md"
|
||||||
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@testing-library/jest-dom": "^4.2.4",
|
"@testing-library/jest-dom": "^4.2.4",
|
||||||
"@testing-library/react": "^9.3.2",
|
"@testing-library/react": "^9.3.2",
|
||||||
|
@ -21,7 +27,8 @@
|
||||||
"test": "react-scripts test",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject",
|
"eject": "react-scripts eject",
|
||||||
"lint": "eslint src --ext .js --cache",
|
"lint": "eslint src --ext .js --cache",
|
||||||
"posttest": "yarn lint"
|
"posttest": "yarn lint",
|
||||||
|
"prepublishOnly": "yarn build"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": ["react-app", "plugin:ghost/browser"],
|
"extends": ["react-app", "plugin:ghost/browser"],
|
||||||
|
|
|
@ -6,7 +6,8 @@ module.exports = {
|
||||||
'bundle.js': glob.sync('build/static/?(js|css)/main.*.?(js|css)').map(f => path.resolve(__dirname, f))
|
'bundle.js': glob.sync('build/static/?(js|css)/main.*.?(js|css)').map(f => path.resolve(__dirname, f))
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: 'build/static/js/bundle.min.js'
|
filename: 'members.min.js',
|
||||||
|
path: __dirname + '/umd'
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
|
Loading…
Add table
Reference in a new issue