Giter VIP home page Giter VIP logo

gulpstarterkitplugintemplate's Introduction

gulpPluginTemplate - Alpha

simple template for a buildfire plugin to be bundled using gulp

init

run npm install to initialize the folder

run

then when ready for final test and release run npm start or gulp build This will prodice a sister folder with _release as a postfix on teh root folder thest his optomized copy then zip and publish

merge

If you are importing into an existing plugin project. Make sure you copy the package.json and gulpfile.js then when adding

combine files

  • to combine your JS files simply surround them with this html comment:
<!-- build:bundleJSFiles  -->...<!-- endbuild -->

this will merge, minify and obfescate all files within these two comments into one JS file

example:

<!-- build:bundleJSFiles  -->
	<script src="app.js"></script>
	<script src="enums.js"></script>
	<script src="app.services.js"></script>
	<script src="controllers/content.home.controller.js"></script>
<!-- endbuild -->

In the release version this will be swapped out to reference a single file

  • to combine your CSS files simply surround them with this html comment:
<!-- build:bundleCSSFiles  -->...<!-- endbuild -->

this will merge, minify and obfescate all files within these two comments into one CSS file

example:

    <!-- build:bundleCSSFiles  -->
    <link rel="stylesheet" type="text/css" href="css/a.css">
    <link rel="stylesheet" type="text/css" href="css/b.css">
    <!-- endbuild -->

file order

if the order matters then edit the gulpfile.js look for the array of tasks that need altereing.

example:

var cssTasks=[
    {name:"widgetCSS",src:"widget/**/*.css",dest:"/widget"}
    ,{name:"controlContentCSS",src:"control/content/**/*.css",dest:"/control/content"}
    ,{name:"controlDesignCSS",src:"control/design/**/*.css",dest:"/control/design"}
    ,{name:"controlSettingsCSS",src:"control/settings/**/*.css",dest:"/control/settings"}
];

looking at the first object {name:"widgetCSS",src:"widget/**/*.css",dest:"/widget"} lets say the CSS file order in this folder affects the outcome. all we need to do if specify the files in an array in teh src property

 {
 name:"widgetCSS"
 ,src:[
 	"widget/css/b.css"
	 ,"widget/css/c.css"
	 ,"widget/a.css"
	]
 ,dest:"/widget"
 }

gulpstarterkitplugintemplate's People

Contributors

danielhindi avatar o5faruk avatar denza avatar grace-pm avatar ricardohintze avatar

Watchers

James Cloos 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.