scotch / angular-brunch-seed

AngularJS + Brunch
Other
228 stars 78 forks source link

JS instead of CS #39

Closed davisford closed 11 years ago

davisford commented 11 years ago

Is there anything in the skeleton that can generate a JS project instead of CS? I'm guessing I can try to do it by hand. I have not used brunch previously, so I'm not that familiar with the tool at this point, but it looks like maybe I could take the js code under _public/app/js and move it to app/scripts/ and then install the brunch JavaScript plugin.

Will this work or is there an easier way to make this happen?

kylefinley commented 11 years ago

@davisford,

That's an excellent question -- I have been considering the creation of separate branch for javascript. If you want to generate the javascript from the coffeescript file you could run:


$ ./node_modules/.bin/coffee -bc app/

You could then remove the coffeescript files:

$ cd app
$ find . -name "*.coffee" -type f|xargs rm -f

in test/testacular.conf.js change files to look like:

files = [
  JASMINE,
  JASMINE_ADAPTER,

  // Application Code //
  'vendor/scripts/angular/angular.js',
  'vendor/scripts/angular/angular-*.js',

  'vendor/scripts/**/*.js',
  // 'vendor/scripts/**/*.coffee',
  'app/scripts/**/*.js',
  // 'app/scripts/**/*.coffee',

  // Javascript //

  'test/vendor/angular/angular-mocks.js',

  // Specs //

  // CoffeeScript //
  // 'test/unit/**/*.spec.coffee'

  // Javascript //
  'test/unit/**/*.spec.js'
];

I think that's all you need, but I might be missing something. Please me know if you run into any problems.

I also have a project called sapling that uses Brunch--with javascript--as a foundation. I haven't had time to work on it much so the code is a little behind this project, but maybe it will help too.

kylefinley commented 11 years ago

I'm close this for now. Feel free to reopen if you still have quetions