Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored Karma tests to use rollup preprocessor & ESM;
Replaced grunt with gulp; Improved dev scripts;
- Loading branch information
1 parent
be2ad1d
commit 462ed4c
Showing
66 changed files
with
5,364 additions
and
6,590 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import gulp from 'gulp'; | ||
import fs from 'fs-extra'; | ||
|
||
gulp.task('default', async function(){ | ||
console.log('hello!'); | ||
}); | ||
|
||
const clear = gulp.task('clear', async function() { | ||
await fs.emptyDir('./dist/') | ||
}); | ||
|
||
const bower = gulp.task('bower', async function () { | ||
const [npm, bower] = await Promise.all([ | ||
fs.readFileSync('package.json'), | ||
fs.readFileSync('bower.json') | ||
]); | ||
|
||
const fields = [ | ||
'name', | ||
'description', | ||
'version', | ||
'homepage', | ||
'license', | ||
'keywords' | ||
]; | ||
|
||
for (let i = 0, l = fields.length; i < l; i++) { | ||
const field = fields[i]; | ||
bower[field] = npm[field]; | ||
} | ||
|
||
await fs.writeFile('bower.json', JSON.stringify(bower, null, 2)); | ||
}); | ||
|
||
const env = gulp.task('env', async function () { | ||
var npm = JSON.parse(await fs.readFile('package.json')); | ||
|
||
await fs.writeFile('./lib/env/data.js', Object.entries({ | ||
VERSION: npm.version | ||
}).map(([key, value]) => { | ||
return `export const ${key} = ${JSON.stringify(value)};` | ||
}).join('\n')); | ||
}); | ||
|
||
const version = gulp.parallel(bower, env); | ||
|
||
export { | ||
bower, | ||
env, | ||
clear, | ||
version | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
export default { | ||
"version": "1.0.0-alpha.1" | ||
}; | ||
export const VERSION = "1.0.0-alpha.1"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.