Skip to content

Commit

Permalink
chore(): rename npm run serve:test-bed to `npm run serve:experiment…
Browse files Browse the repository at this point in the history
…al` (#1192)

* chore(): rename `npm run serve:test-bed` to `npm run serve:experimental`

also modify experimental README to explain how to run the test-bed
application and also how to install the experimental build

* docs(): update README for experimental
  • Loading branch information
emoralesb05 authored and kyleledbetter committed Jul 11, 2018
1 parent d0f5fa5 commit d9d8055
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"coverage:mac": "open -a \"Google Chrome\" coverage/index.html",
"coveralls": "cat ./coverage/lcov.info | node ./node_modules/coveralls/bin/coveralls.js",
"serve": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng serve",
"serve:test-bed": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng serve covalent-test-bed",
"serve:experimental": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng serve covalent-test-bed",
"serve:prod": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng serve --aot --prod --source-map=false --optimization",
"build:docs": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --aot --prod --source-map=false --optimization",
"build:lib": "bash scripts/build-release && gulp version-placeholder",
Expand Down
30 changes: 30 additions & 0 deletions src/platform/experimental/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,40 @@ ___
5. Open all the files in the directory with a text editor and anywhere you see `rename-me` `renameMe` or `RenameMe` replace it with your experiments name. Respective of casing style.
6. In a text editor open `src/platform/experimental/public-api.ts` and include your experiment by adding the following line to the end of the file: `export * from './<my-new-experiment>/index';` (Replace above my-new-experiment to the name of your experiment)

**Step 4:** Run test-bed application

1. `npm run serve:experimental`

**Notes:**
1. By following the template your experiment will be compiled into standard compliant Angular Package Format (APF) via [ng-packagr](https://github.com/dherges/ng-packagr). If you would like to learn more about the benefits of APF you can reference this [link](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/edit).
2. Don't forget to update your experiments `public-api.ts` and your experiments `*.module.ts` files as you decide what parts of your new experiment/feature you want to publicly expose to your fellow developers using it.
3. After you create your experiment test it out on a new/existing compatible angular project (respective of the angular version your experiment is using) and verify that you can use your experiment as designed. Do this by running `npm run build:lib`, and npm installing the generated `deploy/experimental.tgz` respective of file path from the new project that you create. To find out more about how to `npm --save install` your .tgz file check this [link](https://docs.npmjs.com/cli/install).
4. If you experiment starts to become a serious project: (1) fill out your experiments `README.md` and (2) write unit tests for it.
5. If you have question please don't hesitate to ask us by either opening a GitHub issue or connecting with us in the [Covalent Gitter channel](https://gitter.im/Teradata/covalent).


### How to install experimental modules

WARNING: Experimental features are prone to change or be removed at any time. Do not use in production as these features are unsupported!

#### Installation

```bash
npm install --save https://github.com/Teradata/covalent-experimental-nightly.git
```

#### Import the Covalent Experimental NgModules

**src/app/app.module.ts**
```ts
import { CovalentTabSelectModule } from '@covalent/experimental/tab-select';
...
// other imports
@NgModule({
imports: [
CovalentTabSelectModule,
],
...
})
export class AppModule { }
```

0 comments on commit d9d8055

Please sign in to comment.