Giter Site home page Giter Site logo

fantasywind / generator-angular-jade-stylus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yeoman/generator-angular

25.0 25.0 9.0 1.35 MB

Change repo to https://github.com/fantasywind/generator-angular-jscg

JavaScript 46.00% CSS 3.06% CoffeeScript 2.98% HTML 10.47% ApacheConf 37.50%

generator-angular-jade-stylus's People

Contributors

addyosmani avatar artoale avatar btford avatar chicoxyzzy avatar cvrebert avatar eddiemonge avatar exromany avatar fantasywind avatar ifours avatar iknite avatar kevva avatar millette avatar mklabs avatar passy avatar paulsheldrake avatar rahim avatar rajarju avatar robinboehm avatar rocky-jaiswal avatar samaxes avatar santialbo avatar seanpdoyle avatar sensone avatar sindresorhus avatar siyfion avatar sleeper avatar torifat avatar vstirbu avatar wesleycho avatar wzr1337 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

Watchers

 avatar  avatar  avatar

generator-angular-jade-stylus's Issues

更改 livereload port 無反應,以及 grunt build 專案的時候 main.js 沒有內容

再麻煩請修正了,謝謝。

  • 修正更改 livereload port 無反應
    Gruntfile.js line 34
js: {
  files: ['<%= yeoman.app %>/scripts/{,*/}*.js'],
  tasks: ['newer:jshint:all'],
  options: {
    livereload: '<%= connect.options.livereload %>'
  }
},
  • 修正 grunt build 時 main.js 沒有內容
    index.jade
// build:js({.tmp,app}) scripts/main.js
script(src="scripts/app.js")

grunt build

Just created an app.

Ran grunt build.

No "concat" targets found.
Warning: Task "concat" failed. Use --force to continue.

Aborted due to warnings.

grunt serve:dist breaks my app

I built an app with Yeoman, using generator-angular-jade-stylus, and everything worked perfectly in the development version using grunt serve, not a single error in the console, but upon building the app with grunt serve:dist, my app turns into a blank page, with the following error in the console:

66e3c8ac.vendor.js:4 Uncaught Error: Failed to instantiate module monopolyApp due to: Error: [$injector:nomod] Module 'monopolyApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.2.15/$injector/nomod?p0=mon... at http://localhost:9000/scripts/66e3c8ac.vendor.js:4:12729 at http://localhost:9000/scripts/66e3c8ac.vendor.js:4:20410 at b (http://localhost:9000/scripts/66e3c8ac.vendor.js:4:19993) at http://localhost:9000/scripts/66e3c8ac.vendor.js:4:20305 at http://localhost:9000/scripts/66e3c8ac.vendor.js:4:27065 at Array.forEach (native) at f (http://localhost:9000/scripts/66e3c8ac.vendor.js:4:13059) at k (http://localhost:9000/scripts/66e3c8ac.vendor.js:4:27005) at Fa (http://localhost:9000/scripts/66e3c8ac.vendor.js:4:28542) at e (http://localhost:9000/scripts/66e3c8ac.vendor.js:4:18649)

What I have tried:
I have done quite a bit of research on this error, and found a few fixes, but none of them worked for me...One of them mentioned that useminPrepare would minify the scripts, and then uglify would minify the scripts again, corrupting the scripts, and they said to remove uglify from the useminPrepare block to solve it. I tried this and it just gave me an error that it could not find the uglify task, and aborted.

I found another fix that said to change <!-- build:js scripts/vendor.js --> to <!-- build:js(app/..) scripts/vendor.js --> or <!-- build:js(./) scripts/vendor.js --> -- Using this method removed the errors from the console, but still left me with a blank page.

I have the module correctly attached to the body- body(ng-app="monopolyApp") and this is how my module is defined in the app.js:

angular .module('monopolyApp', [ 'ngCookies', 'ngResource', 'ngSanitize', 'ngRoute', 'LocalStorageModule' ])

and in the controller (main.js):

angular.module('monopolyApp') .controller('MainCtrl', function ($scope, $window, $timeout, localStorageService) {

I have also included the index.jade, app.js, and main.js in this gist for further reference. If any further information is needed to diagnose this error please let me know, but I have tried every fix I can find and nothing is working. All I can imagine is that something is going wrong in the concatenation process. Any help is appreciated, thanks!

Edit
I just tried to startup another new app, with the default template that comes after you run the generator the first time, did not edit a single line of the code, and used grunt serve:dist and got the same blank page problem and same error in the console, so it would appear this is a problem with the generator itself and not my code.

npm version

Can you please push a new version of this so npm has the correct npm info (specifically that this isn't a Yeoman team project)?

Watchers/LiveReload not firing on *.styl & *.jade

0.8.5: I got this working by editing my Gruntfile like so:

  stylus: {
    files: ['<%= yeoman.app %>/styles/{,*/}*.styl'],
    tasks: ['stylus:server', 'autoprefixer']
  },

and

  livereload: {
    options: {
      livereload: '<%= connect.options.livereload %>'
    },
    files: [
      '<%= yeoman.app %>/{,*/}*.html',
      '<%= yeoman.app %>/{,*/}*.jade',
      '.tmp/styles/{,*/}*.css',
      '.tmp/scripts/{,*/}*.js',
      '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
    ]
  }

Cheers.

Grunt build - empty main.js

After first setup

yo angular-jade-stylus --jade --stylus myApp

without even changing anything
if I run grunt build

everything is done without errors, but checking .tmp/concat/scripts/main.js
is EMPTY so uglify just gets this empty file and minifies nothing :)

thi is copied from the console

 concat:
  { generated:
   { files:
      [ { dest: '.tmp\\concat\\scripts\\vendor.js',
          src:
           [ 'app\\bower_components\\jquery\\dist\\jquery.js',
             'app\\bower_components\\es5-shim\\es5-shim.js',
             'app\\bower_components\\angular\\angular.js',
             'app\\bower_components\\json3\\lib\\json3.min.js',
             'app\\bower_components\\bootstrap\\dist\\js\\bootstrap.js',
             'app\\bower_components\\angular-resource\\angular-resource.js',
             'app\\bower_components\\angular-cookies\\angular-cookies.js',
             'app\\bower_components\\angular-sanitize\\angular-sanitize.js',
             'app\\bower_components\\angular-route\\angular-route.js',
             'app\\bower_components\\angular-bootstrap\\ui-bootstrap-tpls.js' ] },
        { dest: '.tmp\\concat\\scripts\\main.js',
          src:
           [ '.tmp\\scripts\\app.js',
             '.tmp\\scripts\\controllers\\main.js' ] } ] } }

it looks like that the .tmp\scripts folder is not there at all

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.