Giter VIP home page Giter VIP logo

ez-build's Introduction

EZ-Build Builds made easier and reusable

I've made this project so I can reuse my build across my projects, I thought it might help some other people so feel free to contribute your own configuration.

How to use it?

  • first run npm install -D ez-build or yarn add -D ez-build I wrote a build configuration using webpack + jss + typescript + tslint and created a folder named ts-jss-tslint and inside there are 3 files:
    • build.js
    • build-production.js
    • dev-server.js
    • get-config.js
  • Create a dev-server.js file with the following content
const devServer = require('ez-build/ts-jss-tslint/dev-server.js');
const WebpackConfig = require('ez-build/ts-jss-tslint/get-config.js');

const webpackConfig = new WebpackConfig({
	appDir: 'app', // the app root dir (defaults to 'app')
	buildDir: 'build', // the app build dir (defaults to 'build')
	testDir: 'test', // the app test dir (defaults to 'test')
	title: 'The html file title' // the html file's title (defaults to '')
});

devServer.run(webpackConfig.getWebpackConfig());
  • create a build.js file with the following content:
const build = require('ez-build/ts-jss-tslint/build.js');
const WebpackConfig = require('ez-build/ts-jss-tslint/get-config.js');

const webpackConfig = new WebpackConfig({
	appDir: 'app', // the app root dir (defaults to 'app')
	buildDir: 'build', // the app build dir (defaults to 'build')
	testDir: 'test', // the app test dir (defaults to 'test')
	title: 'Mini sites editor' // the html file's title (defaults to '')
});

build.run(webpackConfig.getWebpackConfig());
  • create a build-productions.js with the following content:
const build = require('ez-build/ts-jss-tslint/build-production.js');
const WebpackConfig = require('ez-build/ts-jss-tslint/get-config.js');

const webpackConfig = new WebpackConfig({
	appDir: 'app', // the app root dir (defaults to 'app')
	buildDir: 'build', // the app build dir (defaults to 'build')
	testDir: 'test', // the app test dir (defaults to 'test')
	title: 'Mini sites editor' // the html file's title (defaults to '')
});

build.run(webpackConfig.getWebpackConfig());
  • on your package.json file add the following scripts:
"scripts": {
    "build": "node ./build.js",
    "build:production": "node ./build-production.js",
    "start": "node ./dev-server.js"
  }

Feel free to add your configuration, Try to keep the same structure for the sake of easy switch between configurations. Thanks!

ez-build's People

Contributors

eliraz-refael avatar

Stargazers

 avatar

Watchers

 avatar  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.