Coder Social home page Coder Social logo

jonathanwolfe / omneo-polymer-build Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 143 KB

Alternative build system for Polymer 1 elements and projects. Allows for a clearer architecture and freedom of pre and post processing. Built with Gulp 3.

License: MIT License

JavaScript 100.00%

omneo-polymer-build's Introduction

Omneo-Polymer-Build

Provides gulp tasks that can be used to quickly build polymer projects.

Configuration Defaults

{
    locations: {
        elements: [ 'app/elements', 'app/pages', 'app/behaviors', 'app/dependency-imports' ],
        tests: [ 'test' ],
        globalCSS: [ 'app/css' ],
        globalJS: [ 'app/js' ],
    },
    sass: {
        src: [],
        dest: 'build/sass',
        includePaths: [ '.', 'app', 'app/elements', 'app/pages', 'app/css', 'bower_components', 'node_modules' ],
        minify: false,
    },
    js: {
        src: [],
        dest: 'build/js',
        addCoverage: false,
        minify: false,
    },
    html: {
        src: [],
        dest: 'build/inline',
        changeBeforeWrite: false,
        changeFunction: new stream.PassThrough(),
    },
    test: {
        dest: 'build/test',
        index: 'app/index.html',
        template: 'app/unit-test-template.html',
    },
}

Usage

Here is an example gulpfile.js:

const fs = require( 'fs-extra' );
const gulp = require( 'gulp' );
const omneoPolymerBuild = require( 'omneo-polymer-build' );
const path = require( 'path' );

const polymerBuildConfig = {
	locations: {
		elements: [ 'src' ],
		globalCSS: [],
		globalJS: [],
	},
	sass: {
		includePaths: [ '.', 'src', 'bower_components', 'node_modules' ],
	},
	test: {
		index: 'unit-test-index.html',
		template: 'unit-test-template.html',
	},
};

omneoPolymerBuild.attachTasks( gulp, polymerBuildConfig );

gulp.task( 'clean', function clean( callback ) {
	return fs.remove( path.resolve( './build' ), callback );
} );

gulp.task( 'build', [ 'inline:elements', 'inline:tests' ] );

omneo-polymer-build's People

Contributors

jonathanwolfe avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.