ionic.config.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. module.exports = {
  2. proxies: null,
  3. // hooks execute before or after all project-related Ionic commands
  4. // (so not for start, docs, but serve, run, etc.) and take in the arguments
  5. // passed to the command as a parameter
  6. //
  7. // The format is 'before' or 'after' + commandName (uppercased)
  8. // ex: beforeServe, afterRun, beforePrepare, etc.
  9. hooks: {
  10. beforeServe: function(argv) {
  11. var path = require('path');
  12. var fork = require('child_process').fork;
  13. // npm generates non-js .bin files for windows, so use gulp directly
  14. fork(path.resolve('./node_modules/gulp/bin/gulp.js'), ['watch']);
  15. }
  16. },
  17. paths: {
  18. wwwDir: 'www',
  19. buildDir: 'build',
  20. buildJSDir: 'js',
  21. buildCSSDir: 'css',
  22. buildFontsDir: 'fonts',
  23. appDir: 'app',
  24. appSrcModule: 'app.ts',
  25. appBuildBundle: 'app.bundle.js',
  26. appSassSrc: ['app.ios.scss', 'app.md.scss'],
  27. appSassWatch: '**/*.scss',
  28. ionicDir: 'node_modules/ionic-framework',
  29. ionicSassDir: 'node_modules/ionic-framework',
  30. ionicFontFiles: 'fonts/**/*.ttf'
  31. },
  32. autoPrefixerOpts: {
  33. browsers: [
  34. 'last 2 versions',
  35. 'iOS >= 7',
  36. 'Android >= 4',
  37. 'Explorer >= 10',
  38. 'ExplorerMobile >= 11'
  39. ],
  40. cascade: false
  41. }
  42. };