mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 12:26:15 +02:00
fix buildsystem for fresh clones
This commit is contained in:
parent
e030fda01a
commit
a41584258a
10
.gitignore
vendored
10
.gitignore
vendored
|
|
@ -1,7 +1,15 @@
|
||||||
/public/node_modules
|
/public/node_modules
|
||||||
node_modules
|
node_modules
|
||||||
.yarn
|
|
||||||
.vagrant
|
.vagrant
|
||||||
/vendor
|
/vendor
|
||||||
/.release
|
/.release
|
||||||
embedded.txt
|
embedded.txt
|
||||||
|
|
||||||
|
# all yarn 2 stuff
|
||||||
|
.yarn/*
|
||||||
|
!.yarn/patches
|
||||||
|
!.yarn/releases
|
||||||
|
!.yarn/plugins
|
||||||
|
!.yarn/sdks
|
||||||
|
!.yarn/versions
|
||||||
|
.pnp.*
|
||||||
|
|
|
||||||
55
.yarn/releases/yarn-berry.cjs
vendored
Executable file
55
.yarn/releases/yarn-berry.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
|
|
@ -110,6 +110,7 @@ files.forEach(function(target)
|
||||||
|
|
||||||
})
|
})
|
||||||
.pipe(source(path.basename(target), "./js/viewjs"))
|
.pipe(source(path.basename(target), "./js/viewjs"))
|
||||||
|
.pipe(buffer())
|
||||||
.pipe(gulpif(minify, uglify()))
|
.pipe(gulpif(minify, uglify()))
|
||||||
.pipe(buffer())
|
.pipe(buffer())
|
||||||
.pipe(sourcemaps.init({ loadMaps: true }))
|
.pipe(sourcemaps.init({ loadMaps: true }))
|
||||||
|
|
@ -131,6 +132,7 @@ components.forEach(function(target)
|
||||||
}), commonjs(), eslint(view_eslint_config)],
|
}), commonjs(), eslint(view_eslint_config)],
|
||||||
})
|
})
|
||||||
.pipe(source(path.basename(target), "./js/viewjs/components"))
|
.pipe(source(path.basename(target), "./js/viewjs/components"))
|
||||||
|
.pipe(buffer())
|
||||||
.pipe(gulpif(minify, uglify()))
|
.pipe(gulpif(minify, uglify()))
|
||||||
.pipe(buffer())
|
.pipe(buffer())
|
||||||
.pipe(sourcemaps.init({ loadMaps: true }))
|
.pipe(sourcemaps.init({ loadMaps: true }))
|
||||||
|
|
@ -159,15 +161,14 @@ function build(cb)
|
||||||
viewjs,
|
viewjs,
|
||||||
resourceFileCopy,
|
resourceFileCopy,
|
||||||
copyLocales,
|
copyLocales,
|
||||||
makeLocales,
|
makeLocales)(cb);
|
||||||
done => { done(); cb(); })();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function publish(cb)
|
function publish(cb)
|
||||||
{
|
{
|
||||||
minify = true;
|
minify = true;
|
||||||
postcss_plugins.push(cssnano())
|
postcss_plugins.push(cssnano())
|
||||||
return build();
|
return build(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
function js(cb)
|
function js(cb)
|
||||||
|
|
@ -183,6 +184,7 @@ function js(cb)
|
||||||
|
|
||||||
})
|
})
|
||||||
.pipe(source('grocy.js', "./js"))
|
.pipe(source('grocy.js', "./js"))
|
||||||
|
.pipe(buffer())
|
||||||
.pipe(gulpif(minify, uglify()))
|
.pipe(gulpif(minify, uglify()))
|
||||||
.pipe(buffer())
|
.pipe(buffer())
|
||||||
.pipe(sourcemaps.init({ loadMaps: true }))
|
.pipe(sourcemaps.init({ loadMaps: true }))
|
||||||
|
|
@ -192,7 +194,7 @@ function js(cb)
|
||||||
|
|
||||||
function viewjs(cb)
|
function viewjs(cb)
|
||||||
{
|
{
|
||||||
return parallel(viewJStasks, done => { done(); cb(); })();
|
return parallel(viewJStasks)(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -208,6 +210,7 @@ function vendor(cb)
|
||||||
plugins: [resolve(), commonjs()],
|
plugins: [resolve(), commonjs()],
|
||||||
})
|
})
|
||||||
.pipe(source('vendor.js', "./js"))
|
.pipe(source('vendor.js', "./js"))
|
||||||
|
.pipe(buffer())
|
||||||
.pipe(gulpif(minify, uglify()))
|
.pipe(gulpif(minify, uglify()))
|
||||||
.pipe(buffer())
|
.pipe(buffer())
|
||||||
.pipe(sourcemaps.init({ loadMaps: true }))
|
.pipe(sourcemaps.init({ loadMaps: true }))
|
||||||
|
|
@ -233,8 +236,7 @@ function resourceFileCopy(cb)
|
||||||
'./node_modules/@fortawesome/fontawesome-free/webfonts/*'
|
'./node_modules/@fortawesome/fontawesome-free/webfonts/*'
|
||||||
]).pipe(dest('./public/webfonts')),
|
]).pipe(dest('./public/webfonts')),
|
||||||
cb => src('./node_modules/summernote/dist/font/*').pipe(dest('./public/css/font')),
|
cb => src('./node_modules/summernote/dist/font/*').pipe(dest('./public/css/font')),
|
||||||
done => { done(); cb(); }
|
)(cb);
|
||||||
)();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function makeLocales()
|
async function makeLocales()
|
||||||
|
|
@ -250,8 +252,7 @@ function copyLocales(cb)
|
||||||
cb => src('./node_modules/bootstrap-select/dist/js/i18n/*').pipe(dest('./public/js/locales/bootstrap-select')),
|
cb => src('./node_modules/bootstrap-select/dist/js/i18n/*').pipe(dest('./public/js/locales/bootstrap-select')),
|
||||||
cb => src('./node_modules/fullcalendar/dist/locale/*').pipe(dest('./public/js/locales/fullcalendar')),
|
cb => src('./node_modules/fullcalendar/dist/locale/*').pipe(dest('./public/js/locales/fullcalendar')),
|
||||||
cb => src('./node_modules/@fullcalendar/core/locales/*').pipe(dest('./public/js/locales/fullcalendar-core')),
|
cb => src('./node_modules/@fullcalendar/core/locales/*').pipe(dest('./public/js/locales/fullcalendar-core')),
|
||||||
done => { done(); cb(); }
|
)(cb);
|
||||||
)();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function live(cb)
|
function live(cb)
|
||||||
|
|
@ -265,7 +266,7 @@ function live(cb)
|
||||||
|
|
||||||
function release(cb)
|
function release(cb)
|
||||||
{
|
{
|
||||||
return series(publish, bundle, done => { done(); cb(); })();
|
return series(publish, bundle)(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
function bundle(cb)
|
function bundle(cb)
|
||||||
|
|
@ -285,6 +286,16 @@ function bundle(cb)
|
||||||
|
|
||||||
return src([
|
return src([
|
||||||
'**/*',
|
'**/*',
|
||||||
|
'!./.*',
|
||||||
|
'!.git/**/*',
|
||||||
|
'!.yarn/**/*',
|
||||||
|
'!.devtools/**/*',
|
||||||
|
'!.github/**/*',
|
||||||
|
'!.tx/**/*',
|
||||||
|
'!.release/**/*',
|
||||||
|
'!public/.gitignore',
|
||||||
|
'!data/plugins/.gitignore',
|
||||||
|
'!data/.gitignore',
|
||||||
'!yarn.lock',
|
'!yarn.lock',
|
||||||
'!package.json',
|
'!package.json',
|
||||||
'!postcss.config.js',
|
'!postcss.config.js',
|
||||||
|
|
@ -292,14 +303,12 @@ function bundle(cb)
|
||||||
'!composer.json',
|
'!composer.json',
|
||||||
'!composer.lock',
|
'!composer.lock',
|
||||||
'!node_modules/**',
|
'!node_modules/**',
|
||||||
'!js/',
|
'!js/**/*',
|
||||||
'!scss/',
|
'!scss/**/*',
|
||||||
'!data/config.php',
|
'!data/config.php',
|
||||||
'!data/storage/**',
|
'!data/storage/**/*',
|
||||||
'!data/grocy.db',
|
'!data/grocy.db',
|
||||||
'data/.htaccess',
|
], { dot: true }).pipe(zip('grocy-' + versionObject.Version + '.zip'))
|
||||||
'public/.htaccess'
|
|
||||||
]).pipe(zip('grocy-' + versionObject.Version + '.zip'))
|
|
||||||
.pipe(dest('.release'))
|
.pipe(dest('.release'))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user