1.0.0 • Published 6 years ago

@nerdbeheard/remove-protractor-schematic v1.0.0

Weekly downloads
315
License
MIT
Repository
github
Last release
6 years ago

Remove Protractor Angular Schematic

npm (scoped)

Remove Protractor from an Angular CLI project

This schematic will:

  • prompt for removal of Protractor files and configuration

Usage šŸš€

Install globally

npm install -g @nerdbeheard/remove-protractor-schematic

Then in an Angular CLI project run

ng g @nerdbeheard/remove-protractor-schematic:add

Optionally run as one command in an Angular CLI app directory. Note this will add the schematic as a dependency to your project.

ng add @nerdbeheard/remove-protractor-schematic

Issues

Issues with this schematic can be filed here.

Thank You šŸ™

Thanks to BrieBug for creating the Cypress Angular Schematic which inspired this schematic.

Development šŸ› 

Getting started

āš™ Node is required for the scripts. Make sure it's installed on your machine.

⬇ Install the dependencies for the schematic and the sandbox application

npm install && cd sandbox && npm install && cd ..

šŸ–‡ Link the schematic in the sandbox to run locally

npm run link:schematic

šŸƒ Run the schematic

npm run build:clean:launch

E2E testing

Execute the schematic against the sandbox. Then run linting, unit & e2e tests and a prod build in the sandbox.

npm run test

Unit Testing

Run the unit tests using Jasmine as a runner and test framework.

npm run test:unit

Reset the sandbox

Running the schematic locally makes file system changes. The sandbox is version controlled so that viewing a diff of the changes is trivial. After the schematic has run locally, reset the sandbox with the following.

npm run clean

Note: if you're using the schematics CLI mentioned below, you can execute the schematic in a dry run mode.

Change the Schematic name

  1. do a global search and replace for schematic-starter and schematicStarter with the new name.
  2. change the folder name from ./src/schematic-starter/... to ./src/NEW_NAME/...
  3. run npm run link:schematic to set up local package linking for the sandbox

Optional - Testing with the Schematics CLI

To test locally, install @angular-devkit/schematics-cli globally and use the schematics command line tool. That tool acts the same as the generate command of the Angular CLI but also has a debug mode.

Check the documentation with

schematics --help

Publishing

To publish, simply do:

npm run build
npm publish