add a gradle build to build everything into a single file

This commit is contained in:
Johanna Dorothea Reichmann 2020-01-12 17:23:45 +01:00
commit 3ec6c2fd27
Signed by untrusted user who does not match committer: transcaffeine
GPG Key ID: 03624C433676E465
5 changed files with 4801 additions and 0 deletions

15
.babelrc Normal file
View File

@ -0,0 +1,15 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"esmodules": true
}
}
]
],
"plugins": [
]
}

14
build.gradle Normal file
View File

@ -0,0 +1,14 @@
plugins {
id "com.moowork.node" version "1.3.1"
id "com.moowork.gulp" version "1.2.0"
}
// run npm install and install gulp when building
gulp_build.dependsOn 'installGulp'
gulp_build.dependsOn 'npmInstall'
task build() {}
// run gulp build on every build
build.dependsOn gulp_build

19
gulpfile.js Normal file
View File

@ -0,0 +1,19 @@
const gulp = require('gulp')
const concat = require('gulp-concat')
const babel = require('gulp-babel')
function defaultTask(cb) {
cb()
}
function build(callback) {
gulp.src('src/**/*.js', { sourcemaps: true})
.pipe(babel())
.pipe(concat('bundle.js'))
.pipe(gulp.dest('dist/'), { sourcemaps: '.'})
callback()
}
exports.build = build
exports.default = defaultTask

4741
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

12
package.json Normal file
View File

@ -0,0 +1,12 @@
{
"name": "spa-demo",
"version": "0.0.1",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.8.0",
"@babel/preset-env": "^7.8.0",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-concat": "^2.6.1"
}
}