diff --git a/scripts/README.md b/scripts/README.md index 835b7354ba..6f861e955e 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -28,20 +28,18 @@ Run `gulp build` or `gulp watch` to watch for changes. #### Development -1. Run `gulp e2e` or `gulp e2e.watch` to watch for changes. -2. Navigate to `http://localhost:8000/dist/e2e` +1. Run `gulp e2e.watch --folder nav/basic` to watch for changes, where `nav` is the component, and `basic` is the test name +2. The browser will launch just like when using `ionic serve`. Make changes to an app in the `src` directory and the app will rebuild. #### Validation The following commands take longer to run because they use AoT compilation. They should really only be used to validate that our components work with AoT, and fix them if not. -1. Run `gulp e2e.prod` to bundle all e2e tests. Folder is optional, see the flags section below. -2. Run `gulp e2e.watchProd` with a folder passed to watch a test. Folder is required, see the flags section below. -3. Navigate to `http://localhost:8000/dist/e2e` +1. Run `gulp e2e.prod` to bundle all e2e tests. ##### Flags -- `--f | -folder` will run the command with a test folder. For example, `gulp e2e.watchProd --f=select/single-value` will watch the test in `src/components/select/test/single-value`. +- `--f | -folder` will run the command with a test folder. - `--debug` will run the `ionic-app-scripts` command with debug output printed. @@ -98,8 +96,6 @@ To remove the linked version of `ionic-angular` do `npm rm ionic-angular`, and t - `gulp snapshot` will run the `gulp e2e.prod` task with AoT compilation. - `gulp snapshot.skipBuild` will skip the `gulp e2e.prod` task with AoT compilation. -- `gulp snapshot.dev` will run a development build using the `gulp e2e` task. -- `gulp snapshot.quick` will skip the build and run snapshot without uploading to the server. #### Flags diff --git a/scripts/demos/copy.config.js b/scripts/demos/copy.config.js index 769ba9d6ea..bbf7187de9 100644 --- a/scripts/demos/copy.config.js +++ b/scripts/demos/copy.config.js @@ -1,7 +1,25 @@ // we don't want to run copy for the demos, so just override the config for now +var path = require('path'); + module.exports = { - copyAssets: { }, - copyIndexContent: { }, - copyFonts: { }, - copyPolyfills: { } + copyAssets: { + src: [path.join(path.dirname(process.env.IONIC_APP_ENTRY_POINT), '..', 'assets', '**', '*')], + dest: '{{WWW}}/assets' + }, + copyIndexContent: { + src: [path.join(process.cwd(), 'scripts', 'demos', 'index.html')], + dest: '{{WWW}}' + }, + copyFonts: { + src: [`${process.cwd()}/node_modules/ionicons/dist/fonts/**/*`, `${process.cwd()}/src/fonts/**/*`], + dest: '{{WWW}}/assets/fonts' + }, + copyPolyfills: { + src: [path.join(process.cwd(), 'dist', 'demos', 'polyfills', 'polyfills.js')], + dest: '{{BUILD}}' + }, + sharedCss: { + src: [path.join(process.cwd(), 'scripts', 'demos', 'demos.shared.css')], + dest: `{{BUILD}}` + } } \ No newline at end of file diff --git a/scripts/demos/demos.template.dev.html b/scripts/demos/demos.template.dev.html deleted file mode 100644 index 78e5775974..0000000000 --- a/scripts/demos/demos.template.dev.html +++ /dev/null @@ -1,57 +0,0 @@ - - - -
-