Skip to content

Commit 1b0dd93

Browse files
committed
initial checkin
0 parents  commit 1b0dd93

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2305
-0
lines changed

.conf/eslint/.eslintrc.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"node": true
6+
},
7+
"extends": "eslint:recommended",
8+
"globals": {
9+
"Atomics": "readonly",
10+
"SharedArrayBuffer": "readonly"
11+
},
12+
"parserOptions": {
13+
"ecmaVersion": 2018,
14+
"sourceType": "module"
15+
},
16+
"rules": {
17+
}
18+
};

.conf/grunt/check_outdated.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* © 2021, db-developer.
3+
* Licensed under the MIT license.
4+
*/
5+
6+
module.exports = function ( grunt, options ) {
7+
return {
8+
target1: {
9+
options: {
10+
// cwd: process.cwd(), // working directory for nyc + mocha run
11+
// dryrun: false, // dry run - do nothing just print cmd line
12+
// quiet false,
13+
/* node: {
14+
exec: false, // defaults to: process.execPath
15+
opts: false // array of node options
16+
}, */
17+
checkoutdated: {
18+
ignore: {
19+
prereleases: false,
20+
devdependencies: false,
21+
packages: [ "webpack" ]
22+
},
23+
columns: [ "name" , "current", "wanted", "latest" ],
24+
depth: false,
25+
global: false
26+
}
27+
}
28+
}
29+
};
30+
};

.conf/grunt/clean.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* © 2020, db-developer.
3+
* Licensed under the MIT license.
4+
*/
5+
6+
module.exports = function ( grunt, options ) {
7+
return {
8+
build: {
9+
src: [ `${ options.BUILDDIR }/` ]
10+
},
11+
coverage: {
12+
src: [ `${ options.COVERAGEDIR }/`, `${ options.TMPDIR }/` ]
13+
},
14+
dist: {
15+
src: [ `${ options.DISTDIR }/*.tgz` ]
16+
}
17+
};
18+
};

.conf/grunt/copy.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/**
2+
* © 2020, db-developer.
3+
* Licensed under the MIT license.
4+
*/
5+
const path = require( "path" );
6+
7+
const LATEST = "latest";
8+
const TGZ = "tgz"
9+
10+
module.exports = function ( grunt, options ) {
11+
const VERSION = options.package.version;
12+
const PACKAGE = options.package.name.replace( "@", "" ).replace( "/", "-" );
13+
const PKGSDIR = path.join( "..", "..", "_packages_" );
14+
15+
return {
16+
build: {
17+
files: [
18+
{
19+
src: [ "*.md", "!CODEFOCONDUCT.md", "!package.json", "LICENSE" ],
20+
dest: `${ options.BUILDDIR }/`
21+
},{
22+
expand: true,
23+
cwd: `${ options.DOCSDIR }/`,
24+
src: [ "**/*.md" ],
25+
dest: `${ options.BUILDDIR }/${ options.DOCSDIR }/`
26+
},{
27+
expand: true,
28+
flatten: true,
29+
filter: "isFile",
30+
src: [ `${ options.TASKSDIR }/*.js` ],
31+
dest: `${ options.BUILDDIR }/tasks/`
32+
}
33+
]
34+
},
35+
deploy: {
36+
files: [
37+
{
38+
src: `${ options.DISTDIR }/${ PACKAGE }-${ VERSION }.${ TGZ }`,
39+
dest: `${ PKGSDIR }/${ PACKAGE }-${ VERSION }.${ TGZ }`
40+
}, {
41+
src: `${ options.DISTDIR }/${ PACKAGE }-${ VERSION }.${ TGZ }`,
42+
dest: `${ PKGSDIR }/${ PACKAGE }-${ LATEST }.${ TGZ }`
43+
}
44+
]
45+
},
46+
test: {
47+
expand: true,
48+
cwd: `${ options.TEMPLATEDIR }/`,
49+
src: `*`,
50+
dest: `${ options.TMPDIR }/`
51+
}
52+
}
53+
};

.conf/grunt/eslint.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* © 2020, db-developer.
3+
* Licensed under the MIT license.
4+
*/
5+
const path = require( "path" );
6+
7+
const ESLINT = "eslint";
8+
const ESLINTFILE = `.${ ESLINT }rc.js`;
9+
const GRUNTFILE = "gruntfile.js";
10+
11+
module.exports = function ( grunt, options ) {
12+
13+
return {
14+
options: {
15+
configFile: path.join( options.CONFDIR, ESLINT, ESLINTFILE )
16+
},
17+
target: [
18+
GRUNTFILE,
19+
`${ options.LIBDIR }/**/*.js`
20+
]
21+
}
22+
};

.conf/grunt/jsdoc2md.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* © 2020, db-developer.
3+
* Licensed under the MIT license.
4+
*/
5+
6+
// Note: This is used for running tests only!
7+
module.exports = function ( grunt, options ) {
8+
return {
9+
api: {
10+
src: `${ options.LIBDIR }/**/*.js`,
11+
dest: `${ options.APIDIR }/`,
12+
options: {
13+
index: {
14+
dest: `${ options.APIDIR }/../api.index.md`
15+
}
16+
}
17+
}
18+
};
19+
};

.conf/grunt/jsonfile.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* © 2020, db-developer.
3+
* Licensed under the MIT license.
4+
*/
5+
6+
// Note: This is used for running tests only!
7+
module.exports = function ( grunt, options ) {
8+
return {
9+
options: {
10+
templates: {
11+
pkgjson: "package.json",
12+
}
13+
},
14+
build: {
15+
template: "pkgjson",
16+
dest: `${ options.BUILDDIR }/package.json`,
17+
merge: {
18+
"main": "tasks/tasks.js",
19+
"scripts": undefined,
20+
"peerDependencies": undefined,
21+
"devDependencies": undefined
22+
}
23+
}
24+
};
25+
};

.conf/grunt/mkdir.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* © 2020, db-developer.
3+
* Licensed under the MIT license.
4+
*/
5+
6+
module.exports = function ( grunt, options ) {
7+
return {
8+
all: {
9+
options: {
10+
mode: 0777,
11+
create: [
12+
options.BUILDDIR,
13+
options.DISTDIR,
14+
options.TMPDIR
15+
]
16+
}
17+
}
18+
}
19+
};

.conf/grunt/move.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* © 2020, db-developer.
3+
* Licensed under the MIT license.
4+
*/
5+
const path = require( "path" );
6+
7+
const TGZSUFFIX = "*.tgz";
8+
9+
module.exports = function ( grunt, options ) {
10+
const PKGSDIR = path.join( "..", "..", "_packages_" );
11+
12+
return {
13+
distribute: {
14+
src: TGZSUFFIX,
15+
dest: `${ options.DISTDIR }/`
16+
}
17+
};
18+
};

.conf/grunt/nyc_mocha.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/**
2+
* © 2020, db-developer.
3+
* Licensed under the MIT license.
4+
*/
5+
6+
// Note: This is used for running tests only!
7+
module.exports = function ( grunt, options ) {
8+
return {
9+
test_and_coverage: {
10+
src: `./src/test/**/*.spec.js`, // test suite to run...
11+
options: {
12+
nyc: {
13+
coverage: { // report nyc coverage results
14+
dir: "dist/coverage", // ... to folder
15+
reporter: [ // ... using reporters
16+
"html", "json", "lcov",
17+
"text-summary"
18+
],
19+
check: true,
20+
perfile: true,
21+
branches: 100,
22+
functions: 100,
23+
lines: 100,
24+
statements: 100
25+
},
26+
excludes: [ "gruntfile.js", ".conf/**/*.js", "src/test/**/*.js" ],
27+
requires: [ "grunt-nyc-mocha/scripts/sourcemapsupport" ]
28+
},
29+
mocha: {
30+
color: true // force colored output
31+
}
32+
}
33+
}
34+
}
35+
};

0 commit comments

Comments
 (0)