Comparing version 4.2.1 to 4.3.0
{ | ||
"name": "tartan", | ||
"version": "4.2.1", | ||
"version": "4.3.0", | ||
"description": "This library allows to parse tartan threadcount.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
# Tartan | ||
This is javascript library that allows | ||
to parse, validate and render tartan | ||
patterns. See also article in | ||
[Wikipedia](https://en.wikipedia.org/wiki/Tartan). | ||
Library is distributed under the | ||
[MIT license](LICENSE). | ||
This is javascript library that allows to parse, validate and render tartan | ||
patterns. See also article in [Wikipedia](https://en.wikipedia.org/wiki/Tartan). | ||
Library is distributed under the [MIT license](LICENSE). | ||
## Install | ||
To use library in your projects, run | ||
`npm install tartan`. Sources are available | ||
in `/src` directory, and pre-build bundles | ||
will be available in `/dist` directory | ||
after installation. | ||
To use library in your projects, run `npm install tartan`. Sources are available | ||
in `/src` directory, and pre-build bundles will be available in `/dist` | ||
directory after installation. | ||
@@ -21,3 +16,4 @@ ## Usage | ||
Add `dist/tartan.js` or `dist/tartan.min.js` to your page and use | ||
global `tartan` variable to access library API. | ||
global `tartan` variable to access library API. Do not forget to add | ||
[`lodash`](https://lodash.com/) as it is the dependency for this library. | ||
@@ -35,4 +31,4 @@ To use this library in CommonJS style use `require`: | ||
use parser and some renderers (like `tartan.render.format()`). Also you can try | ||
to use [this Canvas library](https://github.com/Automattic/node-canvas) for Node.js | ||
(I did not check it yet). | ||
to use [this Canvas library](https://github.com/Automattic/node-canvas) for | ||
Node.js (I did not check it yet). | ||
@@ -39,0 +35,0 @@ ## Examples |
@@ -7,15 +7,22 @@ 'use strict'; | ||
entry: './src/index.js', | ||
output: { | ||
library: 'tartan', | ||
libraryTarget: 'umd' | ||
}, | ||
devtool: 'source-map', | ||
externals: { | ||
// `require('lodash')` should use global var `_` | ||
lodash: '_' | ||
}, | ||
module: { | ||
loaders: [ | ||
{ test: /\.html$/, loader: 'raw' }, | ||
{ test: /\.json/, loader: 'json' }, | ||
{test: /\.html$/, loader: 'raw'}, | ||
{test: /\.json/, loader: 'json'}, | ||
// Evaluate module.js and bundle pre-calculated exports as a value. | ||
// This allows to omit package.json from bundle. | ||
{ test: /[\\\/]@package\.js$/, loaders: ['raw', 'val'] } | ||
{test: /[\\\/]@package\.js$/, loaders: ['raw', 'val']} | ||
] | ||
}, | ||
output: { library: 'tartan', libraryTarget: 'umd' }, | ||
plugins: [ | ||
plugins: [ | ||
new webpack.optimize.OccurenceOrderPlugin(), | ||
@@ -22,0 +29,0 @@ new webpack.DefinePlugin({ |
'use strict'; | ||
var _ = require('lodash'); | ||
var webpack = require('webpack'); | ||
var baseConfig = require('./webpack.config.base'); | ||
@@ -6,0 +5,0 @@ |
@@ -12,3 +12,3 @@ 'use strict'; | ||
}, | ||
plugins: [ | ||
plugins: [ | ||
new webpack.optimize.UglifyJsPlugin({ | ||
@@ -15,0 +15,0 @@ compressor: { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
748592
7827
2
38
1