<commit_before># Altinn Design System

This design system is based on [Pattern Lab](https://github.com/pattern-lab/edition-node-gulp/blob/master/README.md) code and [atomic design principles](http://bradfrost.com/blog/post/atomic-web-design/).
The [repo](https://github.com/Altinn/DesignSystem) contains the source code and configuration for building and running the design system locally and for creating distribution files.

You can always test the [live version](https://altinn.github.io/DesignSystem) of the latest build, or download the [altinn-designsystem](https://www.npmjs.com/package/altinn-designsystem) npm package.


## Dependencies

Make sure that [Node.js](https://nodejs.org) (version 6 or newer) is installed. The package manager [npm](https://www.npmjs.com/) will be included.

Install [bower](https://bower.io/) and [gulp](http://gulpjs.com/):

```shell
npm install -g bower
npm install -g gulpjs/gulp-cli
```

## Setup

Navigate to the root of the code and run `npm install`.  
Also make sure the project in _styleguidekit-assets-altinn_ is built:

```shell
cd styleguidekit-assets-altinn
npm install
bower install
gulp
cd ..
```

## Run

This will take a couple of minutes...

```shell
gulp patternlab:serve
```

The command will build and run the design system locally on <http://localhost:3000> and automatically rebuild if the source code is changed.<commit_msg>Update README.md to include information about Ruby/SASS on Windows, and replace the run-command with the npm variant, which runs gulp with node arguments to avoid OOM errors.<commit_after># Altinn Design System

This design system is based on [Pattern Lab](https://github.com/pattern-lab/edition-node-gulp/blob/master/README.md) code and [atomic design principles](http://bradfrost.com/blog/post/atomic-web-design/).
The [repo](https://github.com/Altinn/DesignSystem) contains the source code and configuration for building and running the design system locally and for creating distribution files.

You can always test the [live version](https://altinn.github.io/DesignSystem) of the latest build, or download the [altinn-designsystem](https://www.npmjs.com/package/altinn-designsystem) npm package.


## Dependencies

Make sure that [Node.js](https://nodejs.org) (version 6 or newer) is installed. The package manager [npm](https://www.npmjs.com/) will be included. 

Install [bower](https://bower.io/) and [gulp](http://gulpjs.com/):

```shell
npm install -g bower
npm install -g gulpjs/gulp-cli
```

## Setup

Navigate to the root of the code and run `npm install`.  
Also make sure the project in _styleguidekit-assets-altinn_ is built. This requires Ruby to be installed in order to install the [sass](http://sass-lang.com/install) gem. For Windows users, see [Ruby](https://rubyinstaller.org/)

```shell
cd styleguidekit-assets-altinn
gem install sass # run with sudo if you get an error
npm install
bower install
gulp
cd ..
```

## Run

This will take a couple of minutes...

```shell
npm run start
```

The command will build and run the design system locally on <http://localhost:3000> and automatically rebuild if the source code is changed.
{'fraction_non_alphanumeric': 0.11249203314212874, 'fraction_numerical': 0.0031867431485022306, 'mean_word_length': 4.507017543859649, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 15, 'lorem ipsum': 0, 'www.': 4, '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': '5840044', 'n_tokens_mistral': 958, 'n_tokens_neox': 906, 'n_words': 351}