Create CookieMonsterDev
This commit is contained in:
15
.github/workflows/CI.yml
vendored
15
.github/workflows/CI.yml
vendored
@@ -12,12 +12,21 @@ jobs:
|
||||
run: npx eslint src
|
||||
- name: Run Mocha tests
|
||||
run: npx mocha
|
||||
- name: Check if CookieMonster.js is built correctly
|
||||
- name: Check if CookieMonsterDev.js is built correctly
|
||||
run: |
|
||||
npx webpack -o ./tmp --env production
|
||||
if cmp <(head -n 2 dist/CookieMonster.js) <(head -n 2 tmp/CookieMonster.js); then
|
||||
if cmp <(head -n 2 dist/CookieMonsterDev.js) <(head -n 2 tmp/CookieMonsterDev.js); then
|
||||
echo '### SUCCESS: CookieMonsterDev is correctly built! ###'
|
||||
else
|
||||
echo '### WARNING: CookieMonsterDev.js does not seem to be correct. Make sure to run "npm run build" after saving all your changes! ###'
|
||||
exit 1
|
||||
fi
|
||||
- name: Check if CookieMonster.js is built correctly
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
if cmp <(head -n 2 dist/CookieMonsterDev.js) <(head -n 2 dist/CookieMonster.js); then
|
||||
echo '### SUCCESS: CookieMonster is correctly built! ###'
|
||||
else
|
||||
echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to run "npm run build" after saving all your changes! ###'
|
||||
echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to copy CookieMonsterDev.js into CookieMonster.js before merging to master! ###'
|
||||
exit 1
|
||||
fi
|
||||
4
dist/CookieMonster.js
vendored
4
dist/CookieMonster.js
vendored
File diff suppressed because one or more lines are too long
2
dist/CookieMonster.js.map
vendored
2
dist/CookieMonster.js.map
vendored
File diff suppressed because one or more lines are too long
3
dist/CookieMonsterDev.js
vendored
Normal file
3
dist/CookieMonsterDev.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
dist/CookieMonsterDev.js.LICENSE copy.txt
vendored
Normal file
10
dist/CookieMonsterDev.js.LICENSE copy.txt
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* jscolor - JavaScript Color Picker
|
||||
*
|
||||
* @link http://jscolor.com
|
||||
* @license For open source use: GPLv3
|
||||
* For commercial use: JSColor Commercial License
|
||||
* @author Jan Odvarko - East Desire
|
||||
*
|
||||
* See usage examples at http://jscolor.com/examples/
|
||||
*/
|
||||
1
dist/CookieMonsterDev.js.map
vendored
Normal file
1
dist/CookieMonsterDev.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -12,11 +12,10 @@
|
||||
],
|
||||
"scripts": {
|
||||
"eslint-src": "eslint src test",
|
||||
"build": "run-s eslint-src pack-prod remove-comment test",
|
||||
"build": "run-s eslint-src pack-prod test",
|
||||
"build-test": "run-s pack-dev",
|
||||
"pack-prod": "webpack --env production",
|
||||
"pack-dev": "webpack",
|
||||
"remove-comment": "sed -i '' -e '/\\/\\/# sourceMappingURL.*/d' dist/CookieMonster.js",
|
||||
"test": "mocha"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
|
||||
module.exports = function (env) {
|
||||
return {
|
||||
@@ -21,8 +22,15 @@ module.exports = function (env) {
|
||||
],
|
||||
},
|
||||
output: {
|
||||
filename: 'CookieMonster.js',
|
||||
filename: 'CookieMonsterDev.js',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
},
|
||||
plugins: [
|
||||
new webpack.SourceMapDevToolPlugin({
|
||||
filename: 'CookieMonsterDev.js.map',
|
||||
publicPath: 'https://cookiemonsterteam.github.io/CookieMonster/dist/',
|
||||
fileContext: 'public',
|
||||
}),
|
||||
],
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user