awh-winterfell
v1.0.3
Published
Enhanced Winterfell library (based on v1.1.4) for AWH
Downloads
6
Readme
AWH-Winterfell
Generate complex, validated and extendable JSON-based forms in React
Enhanced Winterfell survey component. The original Winterfell component can be found here. The repository for the AWH-Winterfell component is private to AWH (https://awh.net) in Bitbucket here.
Usage
Install the awh-winterfell package, which should automatically add it to your package.json
:
$ npm install awh-winterfell
Make sure to update the package to the latest version every so often:
$ npm update awh-winterfell
To use the package in your JavaScript:
var Winterfell = require('awh-winterfell');
or if using ES6 syntax:
import Winterfell from 'awh-winterfell';
To use custom input types or modules specifically for the project consuming AWH-Winterfell (without modifying AWH-Winterfell), just add the custom React modules normally to your project.
Making updates to the npm package
To update the code in the npm package and to increment its version:
- Make and save the desired changes/additions under the src folder, including corresponding changes to index.js and/or inputTypes/index.js when new modules are added.
- Increase the "version" number appropriately in the AWH-Winterfell package.json file, and save the file. If this is done while the repository is open in Folder View in Visual Studio, VS automatically runs the appropriate commands defined in package.json to rebuild the files under the dist folder.
- Commit and push the changes to the AWH-Winterfell repository.
- For the first time you're publishing from your computer, set up the appropriate npm user in your (Powershell) command line with command
npm adduser
. The user with email "[email protected]" and username "service.account.awh.net" can publish this package because it is the owner for this package. - Publish the package with command
npm publish
executed from the AWH-Winterfell folder (see 3 minute Publishing npm packages video at https://www.youtube.com/watch?v=BkotrAFtBM0 for details)