How to use the fuse-box/sparky.src function in fuse-box

To help you get started, we’ve selected a few fuse-box examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fuse-box / react-example / fuse.js View on Github external
})
            ]
        })
    }
    createBundle(fuse) {
        const app = fuse.bundle("app");
        if (!this.isProduction) {
            app.watch()
            app.hmr()
        }
        app.instructions(">index.jsx");
        return app;
    }
});

task("clean", () => src("dist").clean("dist").exec() )

task("default", ["clean"], async context => {
    const fuse = context.getConfig();
    fuse.dev();
    context.createBundle(fuse);
    await fuse.run();
});

task("dist", ["clean"], async context => {
    context.isProduction = true;
    const fuse = context.getConfig();
    fuse.dev(); // remove it later
    context.createBundle(fuse);
    await fuse.run();
});
github aurelia-toolbelt / aurelia-toolbelt / packages / core / scripts / build.js View on Github external
// If commonjs had no errors then we do amd/system and copy css/html


  // ------------------------------------------
  // Transpile
  // ------------------------------------------
  transpileTo('dist/amd/', 'amd');
  transpileTo('dist/system/', 'system');
  transpileTo('dist/es2015/', 'es2015');


  // ------------------------------------------
  // Ts code
  // ------------------------------------------
  src('**/*.*', { base: `../src/${FOLDER_NAME}` })
    .clean('../distTS/')
    .dest('../distTS/')
    .exec();



  // ------------------------------------------
  // Css
  // ------------------------------------------
  src('../dist/**/*.*').clean('*.css');
  src('**/*.css', { base: `../src/${FOLDER_NAME}` })
    .dest('../dist/commonjs/')
    .dest('../dist/amd/')
    .dest('../dist/system/')
    .dest('../dist/es2015/')
    .exec();
github aurelia-v-grid / vGrid / build.js View on Github external
.dest('dist/amd/')
            .dest('dist/system/')
            .dest('dist/es2015/')
            .exec();



        // ------------------------------------------
        // html
        // ------------------------------------------

        // clean
        src('./dist/**/*.*').clean('*.html')

        // copy
        src('**/*.html', { base: `src/${packageName}` })
            .dest('dist/commonjs/')
            .dest('dist/amd/')
            .dest('dist/system/')
            .dest('dist/es2015/')
            .exec();

    });
github aurelia-toolbelt / aurelia-toolbelt / packages / core / scripts / build.js View on Github external
// ------------------------------------------
  // Ts code
  // ------------------------------------------
  src('**/*.*', { base: `../src/${FOLDER_NAME}` })
    .clean('../distTS/')
    .dest('../distTS/')
    .exec();



  // ------------------------------------------
  // Css
  // ------------------------------------------
  src('../dist/**/*.*').clean('*.css');
  src('**/*.css', { base: `../src/${FOLDER_NAME}` })
    .dest('../dist/commonjs/')
    .dest('../dist/amd/')
    .dest('../dist/system/')
    .dest('../dist/es2015/')
    .exec();



  // ------------------------------------------
  // Html
  // ------------------------------------------
  src('../dist/**/*.*').clean('*.html');
  src('**/*.html', { base: `../src/${FOLDER_NAME}` })
    .dest('../dist/commonjs/')
    .dest('../dist/amd/')
    .dest('../dist/system/')
github aurelia-v-grid / vGrid / build.js View on Github external
// ts code
        // ------------------------------------------

        src('**/*.*', { base: `src/${packageName}` })
            .clean('distTS/')
            .dest('distTS/')
            .exec();



        // ------------------------------------------
        // css
        // ------------------------------------------

        // clean
        src('./dist/**/*.*').clean('*.css')

        //copy
        src('**/*.css', { base: `src/${packageName}` })
            .dest('dist/commonjs/')
            .dest('dist/amd/')
            .dest('dist/system/')
            .dest('dist/es2015/')
            .exec();



        // ------------------------------------------
        // html
        // ------------------------------------------

        // clean
github pedromsilvapt / unicast / fuse.js View on Github external
await fetch( platform, [ 'ffmpeg', 'rethinkdb', 'libvips', 'sharp' ] );

    const buildFolder = `builds/${ platform }/`;

    await reset( buildFolder );

    await tsc( __dirname, {
        ...JSON.parse( ( await fs.readFile( 'tsconfig.json', 'utf8' ) ) ).compilerOptions
    } );

    await pkg( [ '.', '--target', getPackageHost( platform ), '--out-path', buildFolder ] );

    for ( let native of nativeFolders ) {
        await makeDir( path.join( buildFolder, native ) );

        await src( path.join( native, '**/*' ), { base: "." } )
            .dest( buildFolder )
            .exec();
    }

    
    await copy( 
        './lib/Extensions',
        path.join( buildFolder, 'Extensions' )
    );

    await copy( 
        './config',
        path.join( buildFolder, 'config' ),
        [ 'default*.yaml' ]
    );
github patrickmichalina / fusing-angular-cli / fuse.ts View on Github external
task('cp.jest', () => {
  return src('jest/**', { base: 'src/templates/unit-tests' }).dest('.build/')
})
github fuse-box / fuse-http / fuse.js View on Github external
async prepareDistFolder() {
        await bumpVersion("package.json", {type : "patch"});
        await src("./package.json").dest("dist/").exec();
    }
github pedromsilvapt / unicast / fuse.js View on Github external
async function copy ( source, dest, filters = null ) {
    await makeDir( dest );

    const globs = !filters || filters.len == 0 
        ? [ path.join( '**', '*' ) ]
        : filters;

    await src( globs, { base: source } )
        .dest( dest )
        .exec();
}
github fuse-box / fuse-http / fuse.js View on Github external
async clean() {
        await src("./dist").clean("dist/").exec();
    }