18.0.0 • Published 2 months ago

@nxext/stencil v18.0.0

Weekly downloads
566
License
MIT
Repository
github
Last release
2 months ago

@nxext/stencil

License nxext windows CI nxext macos CI

Table of Contents

Features

  • Generate Ionic/Pwa project
  • Generate Stencil app project
  • Generate library project

Usage

Add this plugin to an Nx workspace:

yarn add @nxext/stencil

or

npm install @nxext/stencil --save

Project schematics

Generate your projects:

nx g @nxext/stencil:app my-app
nx g @nxext/stencil:pwa my-app
nx g @nxext/stencil:lib my-lib

each generator is able to generate your template with different style variants. Supported are:

--style=css (default)
--style=scss
--style=less
--style=styl
--style=pcss

You can generate components with:

nx g @nxext/stencil:component my-comp

or

nx g @nxext/stencil:c my-comp

If Storybook is configured a <my-comp>.stories.ts is generated.

Build

Build your project:

nx build my-app

Run commands are passed to the stencil compiler. Supported flags are:

ParameterTypeDefaultDescription
--ciboolfalse
--debugboolfalse
--devboolfalse
--docsboolfalse
--port=1234number
--serveboolfalse
--verboseboolfalse
--watchboolfalse
--configPathstring"libs/projectname/stencil.config.ts" or "apps/projectname/stencil.config.ts"relative from workspace root

You can define the path for the stencil.config.ts file like this: The configPath is set in the workspace.json/angular.json for each builder. The default used path can be change there.

Support for tests. For unit tests run:

Test

nx test my-app

Watch

Supported flags are:

  • --watch

For e2e test:

nx e2e my-app

Serve

Serve with:

nx serve my-app

Supported flags are:

ParameterTypeDefaultDescription
--debugboolfalse
--devboolfalse
--docsboolfalse
--port=1234number
--verboseboolfalse
--configPathstring"libs/projectname/stencil.config.ts" or "apps/projectname/stencil.config.ts"relative from workspace root
--openbooleantrue

Storybook

You can generate Storybook configuration for an individual project with this command:

nx g @nxext/stencil:storybook-configuration my-lib

To run the generated Storybook use:

nx storybook my-lib

The Storybook startup needs an successful nx build cause of the generated loaders to work

React and Angular

You're able to generate angular/react libraries for yout stencil libraries using stencils outputtargets:

nx g @nxext/stencil:add-outputtarget my-lib

With the --outputType='react' or --outputType='angular' you can define the kind of library.

18.0.0

2 months ago

17.2.2

3 months ago

17.2.1

3 months ago

17.2.0

4 months ago

17.0.2

6 months ago

17.0.1

6 months ago

17.0.0

6 months ago

16.3.0

11 months ago

15.7.0

1 year ago

15.6.0

1 year ago

15.0.0

1 year ago

14.0.4

2 years ago

14.0.5

2 years ago

14.0.6

2 years ago

14.0.0

2 years ago

14.0.1

2 years ago

14.0.2

2 years ago

14.0.3

2 years ago

13.2.2

2 years ago

13.2.3

2 years ago

13.2.1

2 years ago

13.1.1

2 years ago

13.1.2

2 years ago

13.1.0

2 years ago

12.2.0

3 years ago

13.0.0

3 years ago

12.1.2

3 years ago

12.1.0

3 years ago

12.1.1

3 years ago

12.0.7

3 years ago

12.0.6

3 years ago

12.0.5

3 years ago

12.0.4

3 years ago

12.0.3

3 years ago

12.0.2

3 years ago

12.0.1

3 years ago

12.0.0

3 years ago

11.3.3

3 years ago

11.3.1

3 years ago

11.3.2

3 years ago

11.3.0

3 years ago

11.2.0

3 years ago

11.0.0

3 years ago

10.3.0

3 years ago

10.2.1

4 years ago

10.2.0

4 years ago

10.1.0

4 years ago

10.1.0-0

4 years ago

10.0.0

4 years ago

10.0.0-0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.2-3

4 years ago

0.1.2-2

4 years ago

0.1.2-1

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.14

4 years ago

0.0.14-4

4 years ago

0.0.14-3

4 years ago

0.0.14-2

4 years ago

0.0.14-1

4 years ago

0.0.13-1

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago