@nerdbeheard/remove-protractor-schematic v1.0.0
Remove Protractor Angular Schematic
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
- do a global search and replace for
schematic-starter
andschematicStarter
with the new name. - change the folder name from
./src/schematic-starter/...
to./src/NEW_NAME/...
- 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
6 years ago