@mobilabs/es6lib 1.0.14 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +9 -9
- package/.husky/pre-commit +3 -3
- package/.travis.yml +2 -2
- package/README.md +12 -13
- package/_dist/README.md +12 -13
- package/_dist/lib/es6lib.js +3 -3
- package/_dist/lib/es6lib.min.js +2 -2
- package/_dist/lib/es6lib.min.mjs +2 -2
- package/_dist/lib/es6lib.mjs +3 -3
- package/bin/es6lib.js +18 -17
- package/package.json +41 -22
- package/rmdstore.sh +9 -0
- package/tasks/build.js.dev.js +285 -0
- package/tasks/build.js.prod.js +286 -0
- package/tasks/build.skeleton.prod.js +183 -0
- package/tasks/compress.sh +0 -0
- package/tasks/config.js +6 -0
- package/tasks/dep.private.js +99 -0
- package/test/index.html +59 -0
- package/gulpfile.js +0 -67
- package/tasks/makedist.js +0 -91
- package/tasks/makejs.js +0 -103
- package/tasks/makeprivatepackage.js +0 -71
package/.eslintrc
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Set JavaScript language options
|
|
4
4
|
*/
|
|
5
5
|
"parserOptions": {
|
|
6
|
-
"sourceType": "script"
|
|
6
|
+
"sourceType": "script"
|
|
7
7
|
},
|
|
8
8
|
/**
|
|
9
9
|
* Set Environnement
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"extends": "airbnb-base",
|
|
23
23
|
// Overwritten airbnb's rules:
|
|
24
24
|
"rules": {
|
|
25
|
-
strict: ["error", "global"],
|
|
26
|
-
func-names: ["error", "never"],
|
|
27
|
-
space-before-function-paren: ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
|
|
28
|
-
no-plusplus: ["error", { "allowForLoopAfterthoughts": true }],
|
|
29
|
-
"no-multi-spaces": [2, { exceptions: { "VariableDeclarator": true } }],
|
|
30
|
-
comma-style: ["error", "first", { "exceptions": { "ArrayExpression": true, "ObjectExpression": true } }],
|
|
31
|
-
indent: ["error", 2, { "VariableDeclarator": { "const": 2 }, "SwitchCase": 1 }],
|
|
32
|
-
no-multiple-empty-lines: ["error", { "max": 2, "maxEOF": 0 }]
|
|
25
|
+
"strict": ["error", "global"],
|
|
26
|
+
"func-names": ["error", "never"],
|
|
27
|
+
"space-before-function-paren": ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
|
|
28
|
+
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
|
|
29
|
+
"no-multi-spaces": [2, { "exceptions": { "VariableDeclarator": true } }],
|
|
30
|
+
"comma-style": ["error", "first", { "exceptions": { "ArrayExpression": true, "ObjectExpression": true } }],
|
|
31
|
+
"indent": ["error", 2, { "VariableDeclarator": { "const": 2 }, "SwitchCase": 1 }],
|
|
32
|
+
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 0 }]
|
|
33
33
|
}
|
|
34
34
|
}
|
package/.husky/pre-commit
CHANGED
package/.travis.yml
CHANGED
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ The ES6lib build produces two libraries:
|
|
|
16
16
|
* a library packaged in an UMD module that could be used on both the browser and Node.js,
|
|
17
17
|
* a library packaged as an ES6 module that can be imported with the keyword `import` (import ES6lib from '../../es6lib.mjs').
|
|
18
18
|
|
|
19
|
-
This template does not include a transpiler like babel or a module bundler like browserify/webpack or rollup. It relies on
|
|
19
|
+
This template does not include a transpiler like babel or a module bundler like browserify/webpack or rollup. It relies on Npm scripts to build your library from the source files. Thus, it keeps your library pure (without extra code due to the transpiler or the module bundler).
|
|
20
20
|
|
|
21
21
|
This template is useful if your library is intended to run on ECMAScript 2015 (ES6) compliant browser.
|
|
22
22
|
|
|
@@ -36,7 +36,7 @@ Then, you just need to create a `package.json` file that contains:
|
|
|
36
36
|
"name": "NameOfYourProject",
|
|
37
37
|
"scripts": {
|
|
38
38
|
"create": "npm install @mobilabs/es6lib && npm run populate",
|
|
39
|
-
"populate": "es6lib populate --name $npm_package_name --author $npm_package_config_name --acronym $npm_package_config_acronym --email $npm_package_config_email --url $npm_package_config_url && npm install && npm run build && npm run test && npm run report"
|
|
39
|
+
"populate": "es6lib populate --name $npm_package_name --author $npm_package_config_name --acronym $npm_package_config_acronym --email $npm_package_config_email --url $npm_package_config_url && npm install && npm run build:dev && npm run test && npm run report"
|
|
40
40
|
},
|
|
41
41
|
"config": {
|
|
42
42
|
"name": "John Doe",
|
|
@@ -66,7 +66,7 @@ Your project Folder
|
|
|
66
66
|
| |_ _header // The UMD header,
|
|
67
67
|
| |_ ... // The core or your library,
|
|
68
68
|
|_ tasks
|
|
69
|
-
| |_ ... // The
|
|
69
|
+
| |_ ... // The tasks to build your project,
|
|
70
70
|
|_ test
|
|
71
71
|
| |_ main.js // Your Mocha, Chai test file,
|
|
72
72
|
|_ .eslintignore // Files to be ignored by ESLint,
|
|
@@ -75,7 +75,6 @@ Your project Folder
|
|
|
75
75
|
|_ .npmignore // Files that are ignored by npm publish,
|
|
76
76
|
|_ .travis.yml // A configuration file for Travis CI (if you use it),
|
|
77
77
|
|_ .CHANGELOG.md // The changes between your different versions,
|
|
78
|
-
|_ .gulpfile.js // The main Gulp task,
|
|
79
78
|
|_ index.js // The link to your ES5 library,
|
|
80
79
|
|_ LICENSE.md // The license that applies to your library (here MIT),
|
|
81
80
|
|_ package-lock.json // The NPM dependency tree,
|
|
@@ -88,10 +87,10 @@ This folder is now a NPM package.
|
|
|
88
87
|
|
|
89
88
|
## How to build it
|
|
90
89
|
|
|
91
|
-
The file `
|
|
90
|
+
The file `package.json` contains the build instructions. These instructions populate the folder `lib` from the sources files included in the folder `src`.
|
|
92
91
|
|
|
93
|
-
`
|
|
94
|
-
* the command `npm run build` creates the library at the execution,
|
|
92
|
+
`package.json` implements two operations for the build:
|
|
93
|
+
* the command `npm run build:dev` creates the library at the execution,
|
|
95
94
|
* and the command `npm run watch` updates the library when one of the source files is modified.
|
|
96
95
|
|
|
97
96
|
|
|
@@ -100,23 +99,23 @@ The file `gulpfile.js` contains the build instructions. These instructions popul
|
|
|
100
99
|
Your `package.json` file contains three scripts to test your UMD library:
|
|
101
100
|
|
|
102
101
|
* `npm run test`,
|
|
103
|
-
* `npm run check
|
|
104
|
-
* `npm run display
|
|
102
|
+
* `npm run check:coverage`,
|
|
103
|
+
* `npm run display:coverage`.
|
|
105
104
|
|
|
106
105
|
`npm run test` executes the tests and computes the test coverage.
|
|
107
106
|
|
|
108
|
-
`npm run check
|
|
107
|
+
`npm run check:coverage` checks if the test coverage matches the requirements. Here 100%.
|
|
109
108
|
|
|
110
|
-
`npm run display
|
|
109
|
+
`npm run display:coverage` opens your browser and reports the test coverage.
|
|
111
110
|
|
|
112
111
|
|
|
113
112
|
## How to create a distribution version
|
|
114
113
|
|
|
115
114
|
Your `package.json` file contains a script to build a distribution library:
|
|
116
115
|
|
|
117
|
-
* `npm run
|
|
116
|
+
* `npm run build:prod`
|
|
118
117
|
|
|
119
|
-
The script `
|
|
118
|
+
The script `build:prod` adds a license header to the library and creates a minified version.
|
|
120
119
|
|
|
121
120
|
|
|
122
121
|
## How to use it
|
package/_dist/README.md
CHANGED
|
@@ -16,7 +16,7 @@ The ES6lib build produces two libraries:
|
|
|
16
16
|
* a library packaged in an UMD module that could be used on both the browser and Node.js,
|
|
17
17
|
* a library packaged as an ES6 module that can be imported with the keyword `import` (import ES6lib from '../../es6lib.mjs').
|
|
18
18
|
|
|
19
|
-
This template does not include a transpiler like babel or a module bundler like browserify/webpack or rollup. It relies on
|
|
19
|
+
This template does not include a transpiler like babel or a module bundler like browserify/webpack or rollup. It relies on Npm scripts to build your library from the source files. Thus, it keeps your library pure (without extra code due to the transpiler or the module bundler).
|
|
20
20
|
|
|
21
21
|
This template is useful if your library is intended to run on ECMAScript 2015 (ES6) compliant browser.
|
|
22
22
|
|
|
@@ -36,7 +36,7 @@ Then, you just need to create a `package.json` file that contains:
|
|
|
36
36
|
"name": "NameOfYourProject",
|
|
37
37
|
"scripts": {
|
|
38
38
|
"create": "npm install @mobilabs/es6lib && npm run populate",
|
|
39
|
-
"populate": "es6lib populate --name $npm_package_name --author $npm_package_config_name --acronym $npm_package_config_acronym --email $npm_package_config_email --url $npm_package_config_url && npm install && npm run build && npm run test && npm run report"
|
|
39
|
+
"populate": "es6lib populate --name $npm_package_name --author $npm_package_config_name --acronym $npm_package_config_acronym --email $npm_package_config_email --url $npm_package_config_url && npm install && npm run build:dev && npm run test && npm run report"
|
|
40
40
|
},
|
|
41
41
|
"config": {
|
|
42
42
|
"name": "John Doe",
|
|
@@ -66,7 +66,7 @@ Your project Folder
|
|
|
66
66
|
| |_ _header // The UMD header,
|
|
67
67
|
| |_ ... // The core or your library,
|
|
68
68
|
|_ tasks
|
|
69
|
-
| |_ ... // The
|
|
69
|
+
| |_ ... // The tasks to build your project,
|
|
70
70
|
|_ test
|
|
71
71
|
| |_ main.js // Your Mocha, Chai test file,
|
|
72
72
|
|_ .eslintignore // Files to be ignored by ESLint,
|
|
@@ -75,7 +75,6 @@ Your project Folder
|
|
|
75
75
|
|_ .npmignore // Files that are ignored by npm publish,
|
|
76
76
|
|_ .travis.yml // A configuration file for Travis CI (if you use it),
|
|
77
77
|
|_ .CHANGELOG.md // The changes between your different versions,
|
|
78
|
-
|_ .gulpfile.js // The main Gulp task,
|
|
79
78
|
|_ index.js // The link to your ES5 library,
|
|
80
79
|
|_ LICENSE.md // The license that applies to your library (here MIT),
|
|
81
80
|
|_ package-lock.json // The NPM dependency tree,
|
|
@@ -88,10 +87,10 @@ This folder is now a NPM package.
|
|
|
88
87
|
|
|
89
88
|
## How to build it
|
|
90
89
|
|
|
91
|
-
The file `
|
|
90
|
+
The file `package.json` contains the build instructions. These instructions populate the folder `lib` from the sources files included in the folder `src`.
|
|
92
91
|
|
|
93
|
-
`
|
|
94
|
-
* the command `npm run build` creates the library at the execution,
|
|
92
|
+
`package.json` implements two operations for the build:
|
|
93
|
+
* the command `npm run build:dev` creates the library at the execution,
|
|
95
94
|
* and the command `npm run watch` updates the library when one of the source files is modified.
|
|
96
95
|
|
|
97
96
|
|
|
@@ -100,23 +99,23 @@ The file `gulpfile.js` contains the build instructions. These instructions popul
|
|
|
100
99
|
Your `package.json` file contains three scripts to test your UMD library:
|
|
101
100
|
|
|
102
101
|
* `npm run test`,
|
|
103
|
-
* `npm run check
|
|
104
|
-
* `npm run display
|
|
102
|
+
* `npm run check:coverage`,
|
|
103
|
+
* `npm run display:coverage`.
|
|
105
104
|
|
|
106
105
|
`npm run test` executes the tests and computes the test coverage.
|
|
107
106
|
|
|
108
|
-
`npm run check
|
|
107
|
+
`npm run check:coverage` checks if the test coverage matches the requirements. Here 100%.
|
|
109
108
|
|
|
110
|
-
`npm run display
|
|
109
|
+
`npm run display:coverage` opens your browser and reports the test coverage.
|
|
111
110
|
|
|
112
111
|
|
|
113
112
|
## How to create a distribution version
|
|
114
113
|
|
|
115
114
|
Your `package.json` file contains a script to build a distribution library:
|
|
116
115
|
|
|
117
|
-
* `npm run
|
|
116
|
+
* `npm run build:prod`
|
|
118
117
|
|
|
119
|
-
The script `
|
|
118
|
+
The script `build:prod` adds a license header to the library and creates a minified version.
|
|
120
119
|
|
|
121
120
|
|
|
122
121
|
## How to use it
|
package/_dist/lib/es6lib.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! ****************************************************************************
|
|
2
|
-
* ES6lib v1.0
|
|
2
|
+
* ES6lib v1.1.0
|
|
3
3
|
*
|
|
4
4
|
* A template for writing pure ES6 Javascript libraries.
|
|
5
5
|
* (you can download it from npm or github repositories)
|
|
@@ -312,14 +312,14 @@
|
|
|
312
312
|
const obj = Object.create(methods);
|
|
313
313
|
obj._library = {
|
|
314
314
|
name: 'ES6lib',
|
|
315
|
-
version: '1.0
|
|
315
|
+
version: '1.1.0',
|
|
316
316
|
};
|
|
317
317
|
return obj;
|
|
318
318
|
};
|
|
319
319
|
|
|
320
320
|
// Attaches constants to ES6lib that provide name and version of the lib.
|
|
321
321
|
ES6lib.NAME = 'ES6lib';
|
|
322
|
-
ES6lib.VERSION = '1.0
|
|
322
|
+
ES6lib.VERSION = '1.1.0';
|
|
323
323
|
|
|
324
324
|
|
|
325
325
|
// -- Private Static Methods -----------------------------------------------
|
package/_dist/lib/es6lib.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! ****************************************************************************
|
|
2
|
-
* ES6lib v1.0
|
|
2
|
+
* ES6lib v1.1.0
|
|
3
3
|
*
|
|
4
4
|
* A template for writing pure ES6 Javascript libraries.
|
|
5
5
|
* (you can download it from npm or github repositories)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* at: http://www.opensource.org/licenses/mit-license.php).
|
|
9
9
|
* Built from {{boiler:name}} v{{boiler:name:version}}.
|
|
10
10
|
* ************************************************************************** */
|
|
11
|
-
!function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6lib=e(t)}(this,(t=>{"use strict";let e,n;const i={Public:{}};return n=function(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t[n[i]]=e[n[i]]},function(){const t=i.Public;n(t,{getString:()=>"I am a string!",getArray:()=>[1,2,3]})}(),function(){const n=i.Public,r=t.ES6lib;let o;e=function(){const t=Object.create(o);return t._library={name:"ES6lib",version:"1.0
|
|
11
|
+
!function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6lib=e(t)}(this,(t=>{"use strict";let e,n;const i={Public:{}};return n=function(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t[n[i]]=e[n[i]]},function(){const t=i.Public;n(t,{getString:()=>"I am a string!",getArray:()=>[1,2,3]})}(),function(){const n=i.Public,r=t.ES6lib;let o;e=function(){const t=Object.create(o);return t._library={name:"ES6lib",version:"1.1.0"},t},e.NAME="ES6lib",e.VERSION="1.1.0",e._setTestMode=function(){return[]},e.noConflict=function(){return t.ES6lib=r,this},o={whoami(){return this._library},getString:()=>n.getString(),getArray:()=>n.getArray()}}(),e}));
|
package/_dist/lib/es6lib.min.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! ****************************************************************************
|
|
2
|
-
* ES6lib v1.0
|
|
2
|
+
* ES6lib v1.1.0
|
|
3
3
|
*
|
|
4
4
|
* A template for writing pure ES6 Javascript libraries.
|
|
5
5
|
* (you can download it from npm or github repositories)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* at: http://www.opensource.org/licenses/mit-license.php).
|
|
9
9
|
* Built from {{boiler:name}} v{{boiler:name:version}}.
|
|
10
10
|
* ************************************************************************** */
|
|
11
|
-
const $__ES6GLOB={};!function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6lib=e(t)}($__ES6GLOB,(t=>{"use strict";let e,n;const i={Public:{}};return n=function(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t[n[i]]=e[n[i]]},function(){const t=i.Public;n(t,{getString:()=>"I am a string!",getArray:()=>[1,2,3]})}(),function(){const n=i.Public,r=t.ES6lib;let o;e=function(){const t=Object.create(o);return t._library={name:"ES6lib",version:"1.0
|
|
11
|
+
const $__ES6GLOB={};!function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6lib=e(t)}($__ES6GLOB,(t=>{"use strict";let e,n;const i={Public:{}};return n=function(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t[n[i]]=e[n[i]]},function(){const t=i.Public;n(t,{getString:()=>"I am a string!",getArray:()=>[1,2,3]})}(),function(){const n=i.Public,r=t.ES6lib;let o;e=function(){const t=Object.create(o);return t._library={name:"ES6lib",version:"1.1.0"},t},e.NAME="ES6lib",e.VERSION="1.1.0",e._setTestMode=function(){return[]},e.noConflict=function(){return t.ES6lib=r,this},o={whoami(){return this._library},getString:()=>n.getString(),getArray:()=>n.getArray()}}(),e}));export default $__ES6GLOB.ES6lib;
|
package/_dist/lib/es6lib.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! ****************************************************************************
|
|
2
|
-
* ES6lib v1.0
|
|
2
|
+
* ES6lib v1.1.0
|
|
3
3
|
*
|
|
4
4
|
* A template for writing pure ES6 Javascript libraries.
|
|
5
5
|
* (you can download it from npm or github repositories)
|
|
@@ -313,14 +313,14 @@ const $__ES6GLOB = {};
|
|
|
313
313
|
const obj = Object.create(methods);
|
|
314
314
|
obj._library = {
|
|
315
315
|
name: 'ES6lib',
|
|
316
|
-
version: '1.0
|
|
316
|
+
version: '1.1.0',
|
|
317
317
|
};
|
|
318
318
|
return obj;
|
|
319
319
|
};
|
|
320
320
|
|
|
321
321
|
// Attaches constants to ES6lib that provide name and version of the lib.
|
|
322
322
|
ES6lib.NAME = 'ES6lib';
|
|
323
|
-
ES6lib.VERSION = '1.0
|
|
323
|
+
ES6lib.VERSION = '1.1.0';
|
|
324
324
|
|
|
325
325
|
|
|
326
326
|
// -- Private Static Methods -----------------------------------------------
|
package/bin/es6lib.js
CHANGED
|
@@ -269,7 +269,7 @@ function _addSkeleton(base, app, owner, cright) {
|
|
|
269
269
|
* @returns {} -,
|
|
270
270
|
*/
|
|
271
271
|
function _duplicate(source, dest) {
|
|
272
|
-
const dupFiles = ['.eslintrc', '.travis.yml', '
|
|
272
|
+
const dupFiles = ['.eslintrc', '.travis.yml', 'rmdstore.sh'];
|
|
273
273
|
|
|
274
274
|
for (let i = 0; i < dupFiles.length; i++) {
|
|
275
275
|
process.stdout.write(` copied ${dupFiles[i]}\n`);
|
|
@@ -303,22 +303,23 @@ function _customize(source, dest, app, owner, boilerlib) {
|
|
|
303
303
|
pack.unpkg = `_dist/lib/${app.toLowerCase()}.mjs`;
|
|
304
304
|
pack.module = `_dist/lib/${app.toLowerCase()}.min.mjs`;
|
|
305
305
|
pack.bin = {};
|
|
306
|
-
pack.scripts = {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
};
|
|
306
|
+
// pack.scripts = {
|
|
307
|
+
// build: obj.scripts.build,
|
|
308
|
+
// watch: obj.scripts.watch,
|
|
309
|
+
// dev: obj.scripts.dev,
|
|
310
|
+
// test: obj.scripts.test,
|
|
311
|
+
// 'display-coverage': obj.scripts['display-coverage'],
|
|
312
|
+
// 'check-coverage': obj.scripts['check-coverage'],
|
|
313
|
+
// 'report-coverage': obj.scripts['report-coverage'],
|
|
314
|
+
// report: obj.scripts.report,
|
|
315
|
+
// makedist: obj.scripts.makedist,
|
|
316
|
+
// app: obj.scripts.app,
|
|
317
|
+
// makeprivate: obj.scripts.makeprivate,
|
|
318
|
+
// makelib: obj.scripts.makelib,
|
|
319
|
+
// prepare: obj.scripts.prepare,
|
|
320
|
+
// doc: obj.scripts.doc,
|
|
321
|
+
// };
|
|
322
|
+
pack.scripts = obj.scripts;
|
|
322
323
|
pack.repository = obj.repository;
|
|
323
324
|
pack.repository.url = `https://github.com/${owner.acronym}/${app.toLowerCase()}.git`;
|
|
324
325
|
pack.keywords = ['ES6'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobilabs/es6lib",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A template for writing pure ES6 Javascript libraries",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"minified": "_dist/lib/es6lib.min.js",
|
|
@@ -10,18 +10,44 @@
|
|
|
10
10
|
"es6lib": "./bin/es6lib.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
"
|
|
13
|
+
"general": " --- GENERAL ---",
|
|
14
|
+
|
|
15
|
+
"build:js": " --- JAVASCRIPT --- ",
|
|
16
|
+
"build:js:dev": "node tasks/build.js.dev.js $1",
|
|
17
|
+
"build:js:prod": "node tasks/build.js.prod.js $1",
|
|
18
|
+
|
|
19
|
+
"build:css": " --- CSS --- ",
|
|
20
|
+
|
|
21
|
+
"build:generic": " --- BUILD (GENERIC) --- ",
|
|
22
|
+
|
|
23
|
+
"build:development": " --- BUILD (DEVELOPMENT) --- ",
|
|
24
|
+
"build:dev": "npm run build:js:dev",
|
|
25
|
+
|
|
26
|
+
"build:production": " --- BUILD (PRODUCTION) --- ",
|
|
27
|
+
"build:skeleton:prod": "node tasks/build.skeleton.prod.js $1",
|
|
28
|
+
"prebuild:prod": "npm run build:dev && npm run build:skeleton:prod",
|
|
29
|
+
"build:prod": "npm run build:js:prod",
|
|
30
|
+
|
|
31
|
+
"testing": " --- TESTING --- ",
|
|
16
32
|
"test": "cross-env NODE_ENV=test nyc --reporter=lcov mocha ./test/main.js",
|
|
17
|
-
"display
|
|
18
|
-
"check
|
|
19
|
-
"report
|
|
33
|
+
"display:coverage": "open -a safari ./coverage/lcov-report/index.html",
|
|
34
|
+
"check:coverage": "nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100",
|
|
35
|
+
"report:coverage": "nyc report --reporter=text-lcov | coveralls",
|
|
20
36
|
"report": "nyc report",
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
37
|
+
|
|
38
|
+
"serving": " --- SERVING --- ",
|
|
39
|
+
"server:dev": "http-server --port 8080",
|
|
40
|
+
"server:prod": "http-server --port 8090",
|
|
41
|
+
|
|
42
|
+
"watch:js:css": " --- WATCHING --- ",
|
|
43
|
+
"watch:js": "nodemon --watch './src/**/*.js' --exec npm run build:dev",
|
|
44
|
+
"watch": "npm run watch:js",
|
|
45
|
+
|
|
46
|
+
"deployment": " --- DEPLOYMENT --- ",
|
|
47
|
+
"dep:prod": "rm -rf _dist-$npm_package_version && npm run build:prod && cp -r _dist _dist-$npm_package_version",
|
|
48
|
+
"dep:private": "npm run build:prod && node tasks/dep.private.js && sh tasks/compress.sh ${npm_package_name} ${npm_package_version} @mobilabs",
|
|
49
|
+
|
|
50
|
+
"others": " --- OTHERS ---",
|
|
25
51
|
"prepare": "husky install",
|
|
26
52
|
"doc": ""
|
|
27
53
|
},
|
|
@@ -35,7 +61,6 @@
|
|
|
35
61
|
"library",
|
|
36
62
|
"template",
|
|
37
63
|
"boilerplate",
|
|
38
|
-
"gulp",
|
|
39
64
|
"mocha",
|
|
40
65
|
"istanbul"
|
|
41
66
|
],
|
|
@@ -57,21 +82,15 @@
|
|
|
57
82
|
"chai": "^4.3.7",
|
|
58
83
|
"coveralls": "^3.1.1",
|
|
59
84
|
"cross-env": "^7.0.3",
|
|
60
|
-
"
|
|
61
|
-
"eslint": "^8.40.0",
|
|
85
|
+
"eslint": "^8.41.0",
|
|
62
86
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
63
87
|
"eslint-plugin-import": "^2.27.5",
|
|
64
|
-
"
|
|
65
|
-
"gulp-concat": "^2.6.1",
|
|
66
|
-
"gulp-connect": "^5.7.0",
|
|
67
|
-
"gulp-header": "^2.0.9",
|
|
68
|
-
"gulp-replace": "^1.1.4",
|
|
69
|
-
"gulp-uglify-es": "^3.0.0",
|
|
88
|
+
"http-server": "^14.1.1",
|
|
70
89
|
"husky": "^8.0.3",
|
|
71
90
|
"mocha": "^10.2.0",
|
|
91
|
+
"nodemon": "^2.0.22",
|
|
72
92
|
"nyc": "^15.1.0",
|
|
73
|
-
"
|
|
74
|
-
"opener": "^1.5.2"
|
|
93
|
+
"terser": "^5.17.4"
|
|
75
94
|
},
|
|
76
95
|
"publishConfig": {
|
|
77
96
|
"access": "public"
|