Skip to content

Instantly share code, notes, and snippets.

@TimMurphy
Last active December 10, 2015 18:38
Show Gist options
  • Save TimMurphy/d0ecc96b53bfbf69b93d to your computer and use it in GitHub Desktop.
Save TimMurphy/d0ecc96b53bfbf69b93d to your computer and use it in GitHub Desktop.
Create angular project

https://github.com/Swiip/generator-gulp-angular

Prerequisites

npm install --global --no-optional yo gulp bower tsd
npm install --global --no-optional generator-gulp-angular

Usage

mkdir <new-directory>
cd <new-directory>
yo gulp-angular <app-name> --app-path=source/<app-folder> --dist-path=artifacts --e2e-path=tests/end2end --advanced

I use the defaults except:

  • Select Typescript for Javascript option
  • Select gulp-imagemin as extra option

Build Fixes

Run gulp to find initial errors during build.

ERROR in ./source/ImpressiveMark.App.Website/app/index.module.ts

  • Open ./source/ImpressiveMark.App.Website/app/index.module.ts
  • Fix first line.
  • todo: Report bug to gulp-angular

ERROR in [default] c:/Users/Tim/Code/impressive-mark/app.impressivemark.com/source/ImpressiveMark.App.Website/app/components/malarkey/malarkey.directive.ts:25:15

  • Open ./source/ImpressiveMark.App.Website/app/components/malarkey/malarkey.directive.ts
  • Change private malarkey: any to public malarkey: any
  • todo: Report bug to gulp-angular

Configuration Fixes

  • Open .\source\ImpressiveMark.App.Website\app\index.scss
  • Change $icon-font-path value to "/bower_components/bootstrap-sass/assets/fonts/bootstrap/"
  • Open .\gulp\build.js
  • Replace '../..../bower_components/bootstrap-sass/assets/fonts/bootstrap/' with '../../bower_components/bootstrap-sass/assets/fonts/bootstrap/'
  • todo: Report bug to gulp-angular

Smoke Tests

Run following gulp tasks to smoke test.

  • gulp build
  • gulp serve
  • gulp serve:dist todo: complete list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment