<commit_before># shared-pack
Easily share code between angular.js and node.js.


# Index
 
* [`Requirements`](#requirements)
* [Installation](#installation)
* [Usage](#usage)

<a name="requirements" id="requirements"></a>
# Requirements
<a name="installation" id="installation"></a>
# Installation
aaaaa

aaaaa

aaaaa

aaaaa

aaaaa

aaaaa

aaaaa
aaaaa
aaaaa
aaaaa
aaaaa
aaaaa

aaaaa
aaaaa

aaaaa
aaaaa

aaaaa

aaaaa

aaaaa
aaaaa
aaaaa
aaaaa
aaaaa
aaaaa
aaaaa
aaaaa
aaaaa
aaaaa

aaaaa
aaaaa
aaaaa
aaaaa

<a name="usage"></a>
# Usage
## Create a javascript module
## Compile
## Results




<commit_msg>+improving README<commit_after># shared-pack
Easily share code between angular.js and node.js.


# Index
 
* [`Requirements`](#requirements)
* [`Installation`](#installation)
* [`Usage`](#usage)

<a name="requirements" id="requirements"></a>
# Requirements

* npm
* node.js

<a name="installation" id="installation"></a>
# Installation

`npm install -g shared-pack`

<a name="usage"></a>
# Usage

## Create a javascript module

1. crete folder: `mkdir shared-module && $_`
2. initialize bower.sjon and package.json `bower init && npm init`
3. create module, example `shared-service.js`:
 	```
 	'use strict';

	function SharedService(param1) {
		console.log('Ola', param1);
	}

	module.exports = SharedService;
 	``` 


## Compile

`shared-pack ./shared-service.js`

## Results

The results fo compilation will be a foldr `./build` containing 2 files

* `./build/shared-service.angular.js`

	```
	function SharedService(param1) {
		console.log('Ola', param1);
	}

	angular.module('SharedService', ['param1'])
		.factory('SharedService', ['param1', SharedService]);
	```

* `./build/shared-service.node.js`

	```
	function SharedService(param1) {
		console.log('Ola', param1);
	}

	 module.exports = SharedService(require('param1.js'));
	```
## Set properly `main` field in bower.json and package.json




{'fraction_non_alphanumeric': 0.15441176470588236, 'fraction_numerical': 0.006827731092436975, 'mean_word_length': 4.602941176470588, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1605694', 'n_tokens_mistral': 727, 'n_tokens_neox': 667, 'n_words': 165}