Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// @ts-check
const {bud} = require('@roots/bud');
/**
* Define project paths.
*/
bud
.srcPath('resources/assets')
.distPath('dist');
/**
* Set webpack aliases.
*/
bud.alias({
'@fonts': bud.src('fonts'),
'@images': bud.src('images'),
'@scripts': bud.src('scripts'),
'@styles': bud.src('styles'),
});
/**
* Autoload common modules.
*/
bud.auto({
jquery: ['$', 'window.jQuery'],
});
/**
* Configure live reload.
*/
bud.sync({
// @ts-check
const {bud} = require('@roots/bud');
/**
* Define project paths.
*/
bud
.srcPath('resources/assets')
.distPath('dist');
/**
* Set webpack aliases.
*/
bud.alias({
'@fonts': bud.src('fonts'),
'@images': bud.src('images'),
'@scripts': bud.src('scripts'),
'@styles': bud.src('styles'),
});
/**
* Autoload common modules.
*/
bud.auto({
jquery: ['$', 'window.jQuery'],
});
/**
* Configure live reload.
*/
bud.sync({
enabled: !bud.inProduction,
options: {
proxy: 'http://sage.test',
},
});
/**
* Compile application assets.
*/
bud
.bundle('app', [
bud.src('scripts/app.js'),
bud.src('styles/app.scss'),
])
.bundle('editor', [
bud.src('scripts/editor.js'),
bud.src('styles/editor.scss'),
])
.bundle('customizer', [
bud.src('scripts/customizer.js'),
])
/**
* Group vendored scripts, generate manifests and version assets.
*/
bud
.dependencyManifest()
.inlineManifest()
.vendor()
.hash();
/**
* Copy static assets.
enabled: !bud.inProduction,
options: {
proxy: 'http://sage.test',
},
});
/**
* Compile application assets.
*/
bud
.bundle('app', [
bud.src('scripts/app.js'),
bud.src('styles/app.scss'),
])
.bundle('editor', [
bud.src('scripts/editor.js'),
bud.src('styles/editor.scss'),
])
.bundle('customizer', [
bud.src('scripts/customizer.js'),
])
/**
* Group vendored scripts, generate manifests and version assets.
*/
bud
.dependencyManifest()
.inlineManifest()
.vendor()
.hash();
/**
const {bud} = require('@roots/bud');
/**
* Define project paths.
*/
bud
.srcPath('resources/assets')
.distPath('dist');
/**
* Set webpack aliases.
*/
bud.alias({
'@fonts': bud.src('fonts'),
'@images': bud.src('images'),
'@scripts': bud.src('scripts'),
'@styles': bud.src('styles'),
});
/**
* Autoload common modules.
*/
bud.auto({
jquery: ['$', 'window.jQuery'],
});
/**
* Configure live reload.
*/
bud.sync({
enabled: !bud.inProduction,
options: {
});
/**
* Compile application assets.
*/
bud
.bundle('app', [
bud.src('scripts/app.js'),
bud.src('styles/app.scss'),
])
.bundle('editor', [
bud.src('scripts/editor.js'),
bud.src('styles/editor.scss'),
])
.bundle('customizer', [
bud.src('scripts/customizer.js'),
])
/**
* Group vendored scripts, generate manifests and version assets.
*/
bud
.dependencyManifest()
.inlineManifest()
.vendor()
.hash();
/**
* Copy static assets.
*/
bud
.copyAll(bud.src('images'), bud.dist('images'))
* Configure live reload.
*/
bud.sync({
enabled: !bud.inProduction,
options: {
proxy: 'http://sage.test',
},
});
/**
* Compile application assets.
*/
bud
.bundle('app', [
bud.src('scripts/app.js'),
bud.src('styles/app.scss'),
])
.bundle('editor', [
bud.src('scripts/editor.js'),
bud.src('styles/editor.scss'),
])
.bundle('customizer', [
bud.src('scripts/customizer.js'),
])
/**
* Group vendored scripts, generate manifests and version assets.
*/
bud
.dependencyManifest()
.inlineManifest()
.vendor()
/**
* Configure live reload.
*/
bud.sync({
enabled: !bud.inProduction,
options: {
proxy: 'http://sage.test',
},
});
/**
* Compile application assets.
*/
bud
.bundle('app', [
bud.src('scripts/app.js'),
bud.src('styles/app.scss'),
])
.bundle('editor', [
bud.src('scripts/editor.js'),
bud.src('styles/editor.scss'),
])
.bundle('customizer', [
bud.src('scripts/customizer.js'),
])
/**
* Group vendored scripts, generate manifests and version assets.
*/
bud
.dependencyManifest()
.inlineManifest()