Adding dist and build
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#
|
||||
version: 2
|
||||
jobs:
|
||||
test:
|
||||
build:
|
||||
docker:
|
||||
# specify the version you desire here
|
||||
- image: circleci/node:lts-browsers
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
- node_modules
|
||||
key: v1-dependencies-{{ checksum "package.json" }}
|
||||
|
||||
- run: mkdir reports
|
||||
- run: mkdir reports dist docs
|
||||
|
||||
# Run mocha
|
||||
- run:
|
||||
@@ -73,6 +73,21 @@ jobs:
|
||||
./cc-test-reporter after-build -t lcov
|
||||
when: always
|
||||
|
||||
# compile documentation
|
||||
- run: ./node_modules/.bin/jsdoc -c .jsdoc.json -d ./docs ./src/
|
||||
|
||||
# run babel compile
|
||||
- run: git config user.email "jputney@noverant.com" && git config user.name "Jonathan Putney"
|
||||
- run: ./node_modules/.bin/grunt
|
||||
- run: git add --all dist/
|
||||
|
||||
# run jsdoc
|
||||
# - run: ./node_modules/.bin/jsdoc -c .jsdoc.json -d ./docs ./src/
|
||||
# - run: git add --all docs/
|
||||
|
||||
# git commit and push dist and docs
|
||||
- run: git commit -m "[skip ci] - Updating Dist and Docs" && git push origin master
|
||||
|
||||
# Upload results
|
||||
|
||||
- store_test_results:
|
||||
@@ -86,22 +101,4 @@ jobs:
|
||||
|
||||
- store_artifacts: # upload test coverage as artifact
|
||||
path: ./coverage/lcov.info
|
||||
prefix: tests
|
||||
docs:
|
||||
docker:
|
||||
# specify the version you desire here
|
||||
- image: circleci/node:lts-browsers
|
||||
|
||||
working_directory: ~/scorm-again
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- run: ./node_modules/.bin/jsdoc -c .jsdoc.json -d ./reports ./src/
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- test
|
||||
# - docs
|
||||
prefix: tests
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -63,3 +63,5 @@ typings/
|
||||
# JetBrains Project Directory
|
||||
.idea/
|
||||
/reports/
|
||||
|
||||
.DS_Store
|
||||
10
.mocha-reports.json
Normal file
10
.mocha-reports.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"reporterEnabled": "mocha-junit-reporter, mochawesome",
|
||||
"mochaJunitReporterReporterOptions": {
|
||||
"mochaFile": "reports/mocha/test-results.xml"
|
||||
},
|
||||
"mochawesomeReporterOptions": {
|
||||
"reportDir": "./reports",
|
||||
"reportFilename": "index"
|
||||
}
|
||||
}
|
||||
8811
dist/scorm-again.js
vendored
Normal file
8811
dist/scorm-again.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/scorm-again.js.map
vendored
Normal file
1
dist/scorm-again.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
36
dist/scorm-again.min.js
vendored
Normal file
36
dist/scorm-again.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
61
gruntfile.js
Normal file
61
gruntfile.js
Normal file
@@ -0,0 +1,61 @@
|
||||
module.exports = function(grunt) {
|
||||
grunt.initConfig({
|
||||
browserify: {
|
||||
development: {
|
||||
src: [
|
||||
'./src/**/*.js',
|
||||
],
|
||||
dest: './dist/scorm-again.js',
|
||||
options: {
|
||||
browserifyOptions: {debug: true},
|
||||
transform: [
|
||||
[
|
||||
'babelify', {
|
||||
'presets': ['@babel/preset-env', '@babel/preset-flow'],
|
||||
'plugins': [
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
'@babel/plugin-proposal-private-methods',
|
||||
'@babel/plugin-proposal-optional-chaining',
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
production: {
|
||||
src: [
|
||||
'./src/**/*.js',
|
||||
],
|
||||
dest: './dist/scorm-again.min.js',
|
||||
options: {
|
||||
browserifyOptions: {debug: true},
|
||||
transform: [
|
||||
[
|
||||
'babelify', {
|
||||
'presets': ['@babel/preset-env', '@babel/preset-flow'],
|
||||
'plugins': [
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
'@babel/plugin-proposal-private-methods',
|
||||
'@babel/plugin-proposal-optional-chaining',
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
plugin: [
|
||||
['minifyify',
|
||||
{
|
||||
map: 'scorm-again.js.map',
|
||||
output: './dist/scorm-again.js.map',
|
||||
}],
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-browserify');
|
||||
|
||||
grunt.registerTask('default',
|
||||
['browserify:development', 'browserify:production']);
|
||||
};
|
||||
2256
package-lock.json
generated
2256
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -18,12 +18,18 @@
|
||||
"@babel/register": "^7.7.0",
|
||||
"@types/chai": "^4.2.5",
|
||||
"babel-eslint": "^11.0.0-beta.0",
|
||||
"babelify": "^10.0.0",
|
||||
"browserify": "^16.5.0",
|
||||
"chai": "^4.2.0",
|
||||
"eslint": "^6.6.0",
|
||||
"eslint-config-google": "^0.14.0",
|
||||
"eslint-plugin-import": "^2.18.2",
|
||||
"grunt": "^1.0.4",
|
||||
"grunt-browserify": "^5.3.0",
|
||||
"grunt-cli": "^1.3.2",
|
||||
"jsdoc": "^3.6.3",
|
||||
"jsdoc-babel": "^0.5.0",
|
||||
"minifyify": "^7.3.5",
|
||||
"mocha": "^6.2.2",
|
||||
"mocha-junit-reporter": "^1.23.1",
|
||||
"mochawesome": "^4.1.0",
|
||||
|
||||
Reference in New Issue
Block a user