one-spaces
Advanced tools
Comparing version 0.4.1 to 0.4.2
/** | ||
* @author TroyTae | ||
* @version 0.4.1 | ||
* @version 0.4.2 | ||
* @name one-spaces | ||
*/ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global = global || self, global.OneSpaces = factory()); | ||
}(this, (function () { 'use strict'; | ||
function index () { | ||
var className = ''; | ||
var i = arguments.length; | ||
while (i--) { | ||
className += (' ' + arguments[i]); | ||
} | ||
return className; | ||
} | ||
return index; | ||
}))); | ||
'use strict';function index () { | ||
var className = ''; | ||
var i = arguments.length; | ||
while (i--) { | ||
className += (' ' + arguments[i]); | ||
} | ||
return className; | ||
}module.exports=index; |
{ | ||
"name": "one-spaces", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "A tiny module for making className 😎", | ||
"main": "dist/index.min.js", | ||
"main": "dist/index.js", | ||
"homepage": "https://github.com/TroyTae/one-spaces", | ||
@@ -21,2 +21,3 @@ "author": { | ||
"rollup": "^1.27.0", | ||
"rollup-plugin-terser": "^5.1.2", | ||
"typescript": "^3.7.2", | ||
@@ -23,0 +24,0 @@ "rollup-plugin-typescript2": "^0.25.2" |
const pkg = require('./package.json'); | ||
const {terser} = require('rollup-plugin-terser'); | ||
const typescript = require('rollup-plugin-typescript2'); | ||
const output = { | ||
name: pkg.name | ||
.split('-') | ||
.map((v) => v.slice(0, 1).toUpperCase() + v.slice(1)) | ||
.join(''), | ||
format: 'umd', | ||
banner: `/**\n * @author ${pkg.author.name}\n * @version ${pkg.version}\n * @name ${pkg.name}\n */` | ||
}; | ||
const createConfig = (isProd) => { | ||
const createConfig = (isNode) => { | ||
return { | ||
input: 'src/index.ts', | ||
output: { | ||
...output, | ||
compact: isProd, | ||
file: pkg.main.replace(isProd ? '' : '.min', '') | ||
banner: `/**\n * @author ${pkg.author.name}\n * @version ${pkg.version}\n * @name ${pkg.name}\n */`, | ||
compact: isNode, | ||
format: isNode ? 'cjs' : 'iife', | ||
file: isNode ? pkg.main : `dist/${pkg.name}.js`, | ||
name: pkg.name.split('-').map((v) => v.slice(0, 1).toUpperCase() + v.slice(1)).join(''), | ||
}, | ||
plugins: [ | ||
typescript({ clean: true }) | ||
] | ||
typescript({ clean: true }), | ||
isNode ? null : terser() | ||
].filter(Boolean) | ||
}; | ||
@@ -25,0 +20,0 @@ }; |
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
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
6038
4
57