The development environment has two parts. One part handles building ux-ias.css
and another builds and
serves the documentation application.
-
Clone the repository and install packages via NPM
git clone git@github.com:microfocus/ux-ias.git cd ux-ias npm install -g gulp-cli npm install
-
In one terminal window:
~/ux-ias# gulp
This will build ux-ias and watch files under src/ for changes.
-
In a new terminal:
~/ux-ias# cd docs ~/ux-ias/docs# gulp
This will build the documentation application, start a local server, and watch files under docs/src for changes.
-
Navigate to localhost:8080 to view the documentation application.
This project uses Gulp and ng-gulp to build the project, watch the source for changes, and start a local server which hosts the application.
gulp build:production
Build project without watching for changes or starting servergulp serve:production
Start local servergulp clean
Remove build output directory
Before publishing, it is best for you to have a fork of ux-ias on your GitHub account. You will also want to create a Travis-CI account. Add an access token with public_repo scope from your GitHub account to the Travis-CI environmental variables for your Travis-CI ux-ias build (see https://docs.travis-ci.com/user/deployment/pages/).
-
Build and test changes locally.
-
Increment the version number of ux-ias in the package.json file. You can do this using
npm --no-git-tag-version version x.x.x
if desired. Push the changes to your fork of the repository. -
Build using Travis-CI on your fork of the repository. If you haven't already, enable the build by turning on the slider for your fork of ux-ias on your Travis-CI account. Then builds should start automatically. You can also kick off a build manually from Travis-CI. After building, check that the build succeeds and that the GitHub Pages documentation site on your fork works. Also check that the changes you made are reflected properly in the documentation site. This is the step in which many build errors are caught, so please do these checks on your fork of the repository rather than on ux-ias itself!
-
After creating pull requests, push the changes to the development and master branches of the ux-ias repository. Again, make sure the Travis-CI build succeeds and that the GitHub Pages documentation site loads properly.
-
Dry run publishing to NPM using
npm publish --dry-run
. This command only works on NPM version 6.0.0 or above. Check that the files listed in the output of this command are the same files you intend to publish. -
If the changes made are significant, you may wish to test what you are about to publish in another environment. Run
npm pack
and thennpm install path/to/tarball.tgz
to install the resulting tarball into another project. Test the project to make sure it handles ux-ias properly. -
After logging in to npm using
npm login
(no arguments), publish to NPM usingnpm publish
. (If you get the error "404 Not found" you may need to set the package to Read/Write access - see https://stackoverflow.com/a/53604667/5016547.) Try installing the new version of the package to make sure it was published successfully. -
Add a new release for ux-ias on the MicroFocus GitHub repository from the Releases page. You do not need to add any archives for the source zip files. These are added automatically.