<commit_before># For Stripes developers

If you are working not just on Stripes _modules_ but on Stripes
itself, you will want to use your own git checkouts of the various
Stripes packages (`stripes-connect`, etc.) To do this, you basically
have to trick NPM into pulling in these packages from your checkout
instead of from the package repository. You do this by subverting the
`@folio` scope as described below.

We assume here that you have the
`stripes-core`,
`stripes-connect`,
`stripes-loader`
and
`stripes-experiments`
git modules all checked out next to each other. 

First, remove any NPM configuration you may already have which tells where
to download the production versions of these packages from:

	$ npm config delete @folio:registry
	$ npm config delete @folio-sample-modules:registry

Now pre-populate the Stripes core code's `node_modules` area with symbolic
links to the code you want to work on. Starting in the `stripes-core`
checkout:

	$ mkdir -p node_modules/@folio
	$ cd node_modules/@folio
	$ ln -s ../../../stripes-connect
	$ cd stripes-connect
	$ npm install
	$ cd ..
	$ ln -s ../../../stripes-loader
	$ cd stripes-loader
	$ npm install
	$ npm run build
	$ cd ..

Next, we wire the trivial module into place: so that `stripes-loader`
(not `stripes-core`) can see it:

	$ mkdir @folio-sample-modules
	$ cd @folio-sample-modules
	$ ln -s ../../../stripes-experiments/trivial
	$ cd ../..

You don't need to build the trivial modules, as it gets pulled into the
Stripes UI by WebPack when it is built. So now you are ready to build
and run the service that provides the UI:

	$ npm install
	$ npm run start

## Troubleshooting (shouldn't be needed any more)

This may fail with:

	ERROR in ../trivial/About.js
	Module parse failed: /home/mike/git/work/stripes-experiments/trivial/About.js Unexpected token (4:18)
	You may need an appropriate loader to handle this file type.

This is because Babel is not translating the trivial module from JS6. The
rules that tell WebPack which files to transpile are found in
`webpack.config.base.js`, These rules do say to transpile files
within the `@folio` area. Unfortunately, WebPack resolves symbolic
links before making this check, so the modules that we linked into
`@folio` are instead seen as being in their physical location, and
transpilation is skipped.
<commit_msg>Fix location of updated "trivial" module.<commit_after># For Stripes developers

If you are working not just on Stripes _modules_ but on Stripes
itself, you will want to use your own git checkouts of the various
Stripes packages (`stripes-connect`, etc.) To do this, you basically
have to trick NPM into pulling in these packages from your checkout
instead of from the package repository. You do this by subverting the
`@folio` scope as described below.

We assume here that you have the
`stripes-core`,
`stripes-connect`,
`stripes-loader`
and
`stripes-experiments`
git modules all checked out next to each other. 

First, remove any NPM configuration you may already have which tells where
to download the production versions of these packages from:

	$ npm config delete @folio:registry
	$ npm config delete @folio-sample-modules:registry

Now pre-populate the Stripes core code's `node_modules` area with symbolic
links to the code you want to work on. Starting in the `stripes-core`
checkout:

	$ mkdir -p node_modules/@folio
	$ cd node_modules/@folio
	$ ln -s ../../../stripes-connect
	$ cd stripes-connect
	$ npm install
	$ cd ..
	$ ln -s ../../../stripes-loader
	$ cd stripes-loader
	$ npm install
	$ npm run build
	$ cd ../..

Next, we wire the trivial module into place: so that `stripes-loader`
(not `stripes-core`) can see it:

	$ mkdir @folio-sample-modules
	$ cd @folio-sample-modules
	$ ln -s ../../examples/trivial
	$ cd ../..

You don't need to build the trivial modules, as it gets pulled into the
Stripes UI by WebPack when it is built. So now you are ready to build
and run the service that provides the UI:

	$ npm install
	$ npm run start

## Troubleshooting (shouldn't be needed any more)

This may fail with:

	ERROR in ../trivial/About.js
	Module parse failed: /home/mike/git/work/stripes-experiments/trivial/About.js Unexpected token (4:18)
	You may need an appropriate loader to handle this file type.

This is because Babel is not translating the trivial module from JS6. The
rules that tell WebPack which files to transpile are found in
`webpack.config.base.js`, These rules do say to transpile files
within the `@folio` area. Unfortunately, WebPack resolves symbolic
links before making this check, so the modules that we linked into
`@folio` are instead seen as being in their physical location, and
transpilation is skipped.

{'fraction_non_alphanumeric': 0.07838125665601704, 'fraction_numerical': 0.0017039403620873268, 'mean_word_length': 3.8814968814968815, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2117523', 'n_tokens_mistral': 1421, 'n_tokens_neox': 1321, 'n_words': 661}