0.19.6 • Published 3 months ago

@nanonpm/photon v0.19.6

Weekly downloads
-
License
-
Repository
github
Last release
3 months ago

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies plugin for production

npm run build:lib

Run your unit tests

npm run test:unit

Lints and fixes files

npm run lint

Publishing to npm

Steps for publishing

  1. Make sure you are logged into the nanonpm npm account.
npm login
  1. Update the package version in the package.json file under the version field. We are using semantic versioning.

  2. Update the changelog file with the changes you have made.

  3. Run the deploy command - this will run 2 commands synchronously: i) npm run build:lib (builds the project) ii) npm publish (published to npm)

npm run deploy

Working in Photon

Creating new components

To create a new component and add to Photon & Storybook run:

npm run new

This will run a script prompting you for: 1) The name of the component in Camelcase ie. MyNewComponent 2) The section you would like MyNewComponent to sit under in the Storybookleft menu ie. Forms

It will then create a Vue component, a .stories.js file, an indes.ts (for export) and a types.ts file. These files will be populated with the basic content to allow for quick and easy scaffolding of new components. Upon running this command you should see the new component hotreloaded into Storybook.

Adding SVG Icons

When adding new SVG icons, you can use either of the following methods:

Method 1 - Manual (good for one off icons)

1) Drop the SVG into the Icons/icons/svg folder ie. Icons/icons/svg/House.svg 2) Create a Vue component file for the icon (use the exaxct same name) ie. Icons/icons/House.vue 3) Add the SVG into the Vue component template 4) Update the Icon name list export in Icons/icons/index.ts to have that icon name (this is used to output the icon in Storybook and for icon name validation).

Method 2 - Automated (WARNING - Pro level - use at your own risk!)

1) Drop the SVG into the Icons/icons/svg folder 2) Ensure the SVG only has the <svg>...</svg> as the top level node. Remove andy <xml ...> node 3) Run npm run ico 4) Look for any output errors in terminal - if there's a file name with a space, or the xml tag remains in the SVG file it won't compile properly. 5) You can now add "Full Stack Developer" to your resume ;)

Photon v2 components.

Photon v2 components are a new system of styling photon components.

You can start the local build by running npm run sb and then navigating to the Photon v2 section of the storybook.

If you want to run it with external theme files you can run npm run sb:external and then navigate to the Photon v2 section of the storybook.

In order to get the external theme files to load you need to add the the absolute path to your branding folder for onboarding into the .env file.

Make sure it does not have a trailing slash / at the end.

When you next start the storybook application it will load and pick the theme files from your theme folders.

To learn more about the photon v2 system check the documentation bellow creating photon v2 components

Semantic versioning.

This project uses semantic versioning and semantic release to automatically publish new versions to npm.

When you merge a PR into main, semantic-release will automatically publish a new version to npm.

0.19.6

3 months ago

0.19.5

4 months ago

0.18.0

10 months ago

0.19.0

9 months ago

0.19.1

9 months ago

0.19.2

9 months ago

0.19.3

9 months ago

0.19.4

8 months ago

0.17.2

11 months ago

0.17.1

12 months ago

0.17.0

1 year ago

0.15.6

1 year ago

0.16.0

1 year ago

0.15.4

1 year ago

0.15.5

1 year ago

0.15.0

1 year ago

0.15.1

1 year ago

0.15.2

1 year ago

0.15.3

1 year ago

0.13.0

1 year ago

0.13.1

1 year ago

0.14.0

1 year ago

0.14.1

1 year ago

0.14.2

1 year ago

0.14.3

1 year ago

0.14.4

1 year ago

0.12.0

1 year ago

0.7.0

1 year ago

0.10.0

1 year ago

0.8.1

1 year ago

0.8.0

1 year ago

0.11.0

1 year ago

0.9.0

1 year ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.2

2 years ago

0.5.0

2 years ago

0.5.1

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.3.0

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.1.655

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.2.2

2 years ago

0.1.653

2 years ago

0.1.652

2 years ago

0.1.654

2 years ago

0.1.649

2 years ago

0.1.651

2 years ago

0.1.650

2 years ago

0.1.646

2 years ago

0.1.645

2 years ago

0.1.648

2 years ago

0.1.647

2 years ago

0.1.642

2 years ago

0.1.641

2 years ago

0.1.644

2 years ago

0.1.643

2 years ago

0.1.635

2 years ago

0.1.634

2 years ago

0.1.637

2 years ago

0.1.636

2 years ago

0.1.633

2 years ago

0.1.632

2 years ago

0.1.639

2 years ago

0.1.638

2 years ago

0.1.640

2 years ago

0.1.628

2 years ago

0.1.627

2 years ago

0.1.629

2 years ago

0.1.631

2 years ago

0.1.613

2 years ago

0.1.612

2 years ago

0.1.615

2 years ago

0.1.611

2 years ago

0.1.610

2 years ago

0.1.619

2 years ago

0.1.624

2 years ago

0.1.623

2 years ago

0.1.626

2 years ago

0.1.625

2 years ago

0.1.620

2 years ago

0.1.622

2 years ago

0.1.621

2 years ago

0.1.602

2 years ago

0.1.601

2 years ago

0.1.604

2 years ago

0.1.603

2 years ago

0.1.600

2 years ago

0.1.609

2 years ago

0.1.606

2 years ago

0.1.605

2 years ago

0.1.608

2 years ago

0.1.598

3 years ago

0.1.594

3 years ago

0.1.593

3 years ago

0.1.596

3 years ago

0.1.595

3 years ago

0.1.590

3 years ago

0.1.592

3 years ago

0.1.591

3 years ago

0.1.589

3 years ago

0.1.587

3 years ago

0.1.588

3 years ago

0.1.586

3 years ago

0.1.585

3 years ago

0.1.583

3 years ago

0.1.582

3 years ago

0.1.584

3 years ago

0.1.581

3 years ago

0.1.579

3 years ago

0.1.578

3 years ago

0.1.576

3 years ago

0.1.575

3 years ago

0.1.577

3 years ago

0.1.574

3 years ago

0.1.573

3 years ago

0.1.572

3 years ago

0.1.571

3 years ago

0.1.570

3 years ago

0.1.569

3 years ago

0.1.568

3 years ago

0.1.567

3 years ago

0.1.566

3 years ago

0.1.565

3 years ago

0.1.559

3 years ago

0.1.564

3 years ago

0.1.561

3 years ago

0.1.560

3 years ago

0.1.563

3 years ago

0.1.562

3 years ago

0.1.558

3 years ago

0.1.557

3 years ago

0.1.556

3 years ago

0.1.555

3 years ago

0.1.554

3 years ago

0.1.553

3 years ago

0.1.552

3 years ago

0.1.547

3 years ago

0.1.546

3 years ago

0.1.549

3 years ago

0.1.548

3 years ago

0.1.544

3 years ago

0.1.550

3 years ago

0.1.54

3 years ago

0.1.543

3 years ago

0.1.542

3 years ago

0.1.541

3 years ago

0.1.53

3 years ago

0.1.52

3 years ago

0.1.51

3 years ago

0.1.5

3 years ago