New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

uxcore-const

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uxcore-const - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

build/Const.js

5

demo/ConstDemo.js

@@ -9,6 +9,6 @@ /**

let classnames = require('classnames');
let Const = require('../src');
window.Const = Const;
class Demo extends React.Component {

@@ -25,3 +25,2 @@

<div>
<Const/>
</div>

@@ -28,0 +27,0 @@ );

2

demo/index.js

@@ -10,2 +10,2 @@ /**

var Demo = require('./ConstDemo');
React.render(<Demo/>, document.getElementById('UXCoreDemo'));
ReactDOM.render(<Demo/>, document.getElementById('UXCoreDemo'));
// https://github.com/gulpjs/gulp/tree/master/docs
var gulp = require('gulp');
var fs = require('fs');
var inquirer = require('inquirer');
var spawn = require('cross-spawn');
var file = require('html-wiring');
var colors = require('colors/safe');
colors.setTheme({
info: ['bold', 'green']
});
var pkg = JSON.parse(file.readFileAsString('package.json'));
var versionCompare = function(a, b) {
var aArr = a.split('.');
var bArr = b.split('.');
var larger = false;
for (var i = 0; i < 3; i++) {
if (parseInt(aArr[i]) === parseInt(bArr[i])) {
}
else {
larger = parseInt(aArr[i]) > parseInt(bArr[i]);
break;
}
}
return larger;
}
var webpack = require('webpack');

@@ -11,2 +37,5 @@

// https://www.npmjs.com/package/gulp-babel
var babel = require('gulp-babel');
// https://www.npmjs.com/package/gulp-less

@@ -24,2 +53,5 @@ var less = require('gulp-less');

// https://www.npmjs.com/package/gulp-es3ify
var es3ify = require("gulp-es3ify");
gulp.task('pack_demo', function(cb) {

@@ -35,10 +67,13 @@ webpack(require('./webpack.dev.js'), function (err, stats) {

gulp.task('less_component', function(cb) {
gulp.src(['./src/**/*.less'])
.pipe(sourcemaps.init())
.pipe(less())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./src'));
console.info('###### less_component done ######');
cb();
gulp.task('pack_build', function(cb) {
gulp.src(['./src/**/*.js'])
.pipe(babel({
presets: ['react', 'es2015-loose', 'stage-1'],
plugins: ['add-module-exports']
}))
.pipe(es3ify())
.pipe(gulp.dest('build'))
.on('end', function() {
cb();
})
});

@@ -75,3 +110,2 @@

'pack_demo',
'less_component',
'less_demo'

@@ -88,3 +122,3 @@ ], function() {

gulp.watch('src/**/*.less', ['reload_by_component_css']);
gulp.watch('src/**/*.less', ['reload_by_demo_css']);

@@ -94,1 +128,62 @@ gulp.watch('demo/**/*.less', ['reload_by_demo_css']);

});
gulp.task('default', ['pack_build'], function() {
});
gulp.task('publish', ['pack_build'], function() {
setTimeout(function() {
var questions = [
{
type: 'input',
name: 'version',
message: 'please enter the package version to publish (should be xx.xx.xx)',
default: pkg.version,
validate: function(input) {
if (/\d+\.\d+\.\d+/.test(input)) {
if (versionCompare(input, pkg.version)) {
return true;
}
else {
return "the version you entered should be larger than now"
}
}
else {
return "the version you entered is not valid"
}
}
},
{
type: 'input',
name: 'branch',
message: 'which branch you want to push',
default: 'master'
},
{
type: 'input',
name: 'npm',
message: 'which npm you want to publish',
default: 'npm',
validate: function(input) {
if (/npm/.test(input)) {
return true;
}
else {
return "it seems not a valid npm"
}
}
}
];
inquirer.prompt(questions, function(answers) {
pkg.version = answers.version;
file.writeFileFromString(JSON.stringify(pkg, null, ' '), 'package.json');
console.log(colors.info('#### Git Info ####'));
spawn.sync('git', ['add', '.'], {stdio: 'inherit'});
spawn.sync('git', ['commit', '-m', 'ver. ' + pkg.version], {stdio: 'inherit'});
spawn.sync('git', ['push', 'origin', answers.branch], {stdio: 'inherit'});
console.log(colors.info('#### Npm Info ####'));
spawn.sync(answers.npm, ['publish'], {stdio: 'inherit'});
})
}, 0)
});
{
"name": "uxcore-const",
"version": "0.0.1",
"description": "uxcore-const component for uxcore.",
"repository": "https://github.com/uxcore/uxcore-const.git",
"author": "zhouquan.yezq",
"main": "src/index.js",
"scripts": {
},
"bugs": {
"url": "http://github.com/uxcore/uxcore-const/issues"
},
"keywords": [
"react",
"react-component",
"uxcore-const",
"Const",
"const"
],
"devDependencies": {
},
"dependencies": {
"react": "^0.13.3"
},
"contributors": [],
"license": "MIT"
}
"name": "uxcore-const",
"version": "0.0.2",
"description": "uxcore-const component for uxcore.",
"repository": "https://github.com/uxcore/uxcore-const.git",
"author": "zhouquan.yezq",
"main": "build/index.js",
"scripts": {},
"bugs": {
"url": "http://github.com/uxcore/uxcore-const/issues"
},
"keywords": [
"react",
"react-component",
"uxcore-const",
"Const",
"const"
],
"devDependencies": {
"babel": "~6.3.26",
"babel-core": "~6.4.0",
"babel-loader": "~6.2.1",
"babel-plugin-add-module-exports": "~0.1.2",
"babel-preset-es2015-loose": "~7.0.0",
"babel-preset-react": "~6.3.13",
"babel-preset-stage-1": "~6.3.13",
"browser-sync": "~2.11.0",
"colors": "^1.1.2",
"console-polyfill": "~0.2.1",
"cross-spawn": "^2.1.5",
"es3ify-loader": "~0.1.0",
"es5-shim": "~4.1.10",
"gulp": "~3.9.0",
"gulp-babel": "~6.1.1",
"gulp-concat": "~2.6.0",
"gulp-es3ify": "0.0.0",
"gulp-just-replace": "~1.0.2",
"gulp-less": "~3.0.3",
"gulp-sourcemaps": "~1.6.0",
"html-wiring": "~1.2.0",
"inquirer": "^0.12.0",
"react": "~0.14.0",
"react-dom": "~0.14.0",
"webpack": "^1.10.5"
},
"dependencies": {},
"contributors": [],
"license": "MIT"
}

@@ -32,2 +32,12 @@ var fs = require('fs');

{
test: /\.js(x)*$/,
// uxcore以外的modules都不需要经过babel解析
exclude: function (path) {
var isNpmModule = !!path.match(/node_modules/);
var isUxcore = !!path.match(/node_modules[\/\\](@ali[\/\\])?uxcore/);
return isNpmModule & !isUxcore;
},
loader: 'es3ify-loader'
},
{

@@ -38,6 +48,12 @@ test: /\.js(x)*$/,

var isNpmModule = !!path.match(/node_modules/);
var isUxcore = !!path.match(/node_modules\/uxcore/);
var isUxcore = !!path.match(/node_modules[\/\\](@ali[\/\\])?uxcore/);
return isNpmModule & !isUxcore;
},
loader: 'babel-loader?stage=1'
loader: 'babel-loader',
query: {
presets: ['react', 'es2015-loose', 'stage-1'],
plugins: [
'add-module-exports'
]
}
}

@@ -47,6 +63,7 @@ ]

resolve: {
// alias: getUxcoreModuleAlias()
alias: getUxcoreModuleAlias()
},
externals: {
react: 'var React' // 相当于把全局的React作为模块的返回 module.exports = React;
react: 'var React', // 相当于把全局的React作为模块的返回 module.exports = React;
'react-dom': 'var ReactDOM'
},

@@ -58,4 +75,5 @@ plugins: [

__PRO__: false // 生产环境
})
}),
new webpack.optimize.DedupePlugin()
]
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc