Code Monkey home page Code Monkey logo

stencil-ng1-demo's Introduction

Modest TypeScript-Angular 1.x Boilerplate

Summary

This boilerplate uses the TypeScript compiler directly to bundle files into a single file with AMD-modules.

The typescript compiler is run with: tsc -p app --outFile dev/js/main.js

Unscientific benchmarks suggest this approach to be considerably faster than Browserify or Webpack.

The bundle includes a small (1kb when minified) AMD API shim called Almond.

The essential stylesheet, template and watch related tasks you would except in a boilerplate are also included. Test runners, linting etc. are left out to avoid bloating the repository too much.

Getting started

  • You need to have npm and node installed
  • If you don't have gulp installed as a global package, you can get by by using the defined npm scripts, but I would definitely advice installing gulp. To get a list of available gulp tasks, just run gulp.
  • To install packages, run npm install
  • To build the app, run npm run build
  • To start the application, run npm start and navigate to localhost:7203 in your browser.
Minifying your app
  • By default the application is build into dev folder un-minified and with sourcemaps.
  • To get your application production ready, just run npm run minify or gulp minify. Note: this task expects you to have all of your html, js and css already in the dev folder.
  • Alternatively, you can run gulp minify-js and gulp minify-css.
  • Notice that the minified files end up in dist folder.
Adding new dependencies
  • In gulp/config.js you'll see a list of vendor paths pointing to node_modules folder.
  • To add new dependencies, just install them through npm by running npm install --save <new_dependency>, and add a new filepath in gulp/config.js.
  • Notice that JS and CSS dependencies are maintained separately.

####References

stencil-ng1-demo's People

Contributors

enaukkarinen avatar vivainio avatar tkrotoff avatar

Stargazers

Sebastian Plaza avatar Chang avatar kern.ding-lf avatar Scott avatar Aleksandr N. Ryzhov avatar Edgar Zavala avatar Bobby ^_^ avatar

Watchers

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