GithubHelp home page GithubHelp logo

luwen-huang / angular-gulp-webpack-starter Goto Github PK

View Code? Open in Web Editor NEW
58.0 7.0 20.0 22.9 MB

template starter kit demonstrating angular, gulp, webpack with ui-router and lazy-loading

HTML 8.96% JavaScript 89.93% CSS 1.11%

angular-gulp-webpack-starter's Introduction

Angular, Gulp, Webpack Starter

This starter kit configures webpack and gulp with an Angular single page app. For the three part blog post that accompanies this, head over to Part III.

I've updated the code from the blog to correct for some typos, so you should go with the code here, instead of from the posts.

This starter kit is barebones, rather ugly, and meant to be only an example for a few things:

  • How to run webpack on gulp (because gulp is simple and awesome to use)
  • How to require in html and scss, especially with Angular templates
  • How to structure your Angular app in a modular way to be require'd
  • How to set up ui-router with webpack lazy-loading

Note that the custom lodash build in bower_components was generated from the lodash-cli. If you want to use other builds, make sure to change the lodash path referenced in the webpack config.

Install

git clone https://github.com/starterkits/frontend-starterkit-minimal.git
cd angular-gulp-webpack-starter
npm install

Development

gulp watch

Production

For simplicity, I've decided not to include a production gulp task, but I've included a line in the webpack config that shows how you can do things like uglify. If there are requests, I can write out a production task.

angular-gulp-webpack-starter's People

Contributors

ay13 avatar luwen-huang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-gulp-webpack-starter's Issues

alternative to $ocLazyLoad

Will be posible get an approach with something like this instead use $q and $ocLazyLoad?
like in this article..
http://ify.io/lazy-loading-in-angularjs/
thanks in advance..

angular.config(['$controllerProvider', '$compileProvider', '$filterProvider', '$provide', configAppResources])

function configAppResources($controllerProvider, $compileProvider, $filterProvider, $provide) {
app.controller = $controllerProvider.register;
app.directive = $compileProvider.directive;
app.filter = $filterProvider.register;
app.factory = $provide.factory;
app.service = $provide.service;
}

Magnification causes app to break

If you uncomment the line in gulpfile.js with the uglify plugin the minified version will not run correctly. It wont switch states or load in the lazy loaded file.

not working

thanks for your work. but it can not working.

gulp repack

Error: Module did not self-register.
at Error (native)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
……

咋回事?

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.