Skip to content

Commit 1e2c04b

Browse files
fix : upgrade node and package.json versions (node : tested on v18.20.4(LTS))
1 parent ed166a1 commit 1e2c04b

File tree

7 files changed

+8511
-5226
lines changed

7 files changed

+8511
-5226
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015", "stage-0"]
3+
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Andrew-Kang-G
3+
Copyright (c) 2018 patternknife
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
# Url-knife [![Build Status](https://travis-ci.org/Andrew-Kang-G/url-knife.svg?branch=master)](https://travis-ci.org/Andrew-Kang-G/url-knife) [![NPM version](https://img.shields.io/npm/v/url-knife.svg)](https://www.npmjs.com/package/url-knife) [![](https://data.jsdelivr.com/v1/package/gh/Andrew-Kang-G/url-knife/badge)](https://www.jsdelivr.com/package/gh/Andrew-Kang-G/url-knife) [![](https://badgen.net/bundlephobia/minzip/url-knife)](https://bundlephobia.com/result?p=url-knife)
1+
# Url-knife [![Build Status](https://travis-ci.org/patternknife/url-knife.svg?branch=master)](https://travis-ci.org/patternknife/url-knife) [![NPM version](https://img.shields.io/npm/v/url-knife.svg)](https://www.npmjs.com/package/url-knife) [![](https://data.jsdelivr.com/v1/package/gh/patternknife/url-knife/badge)](https://www.jsdelivr.com/package/gh/patternknife/url-knife) [![](https://badgen.net/bundlephobia/minzip/url-knife)](https://bundlephobia.com/result?p=url-knife)
22
## Overview
33
Extract and decompose (fuzzy) URLs (including emails, which are conceptually a part of URLs) in texts with robust patterns.
44

5-
#### URL knife (recommended)
5+
#### URL knife
66
<a href="https://jsfiddle.net/AndrewKang/xtfjn8g3/" target="_blank">LIVE DEMO</a>
7-
#### Fuzzy URL knife (false positives, but detect human errors)
8-
<a href="https://jsfiddle.net/AndrewKang/p0tc4ovb/" target="_blank">LIVE DEMO</a>
97

108

119
## Installation
@@ -24,6 +22,7 @@ For ES5 users,
2422
```
2523

2624
For ES6 npm users, run 'npm install --save url-knife' on console.
25+
(Node v18.20.4)
2726

2827
``` html
2928
import Pattern from 'url-knife';

gulpfile.babel.js

Lines changed: 19 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,21 @@
11
import gulp from 'gulp';
2-
import babel from 'gulp-babel';
32
import mocha from 'gulp-mocha';
4-
import gutil from 'gulp-util';
5-
import webpack from 'webpack';
6-
import webpackConfig from './webpack.config.babel';
7-
import WebpackDevServer from 'webpack-dev-server';
8-
9-
gulp.task('default', ['webpack']);
10-
11-
gulp.task('babel', () => {
12-
return gulp.src('src/*.js')
13-
.pipe(babel())
14-
.pipe(gulp.dest('target'));
15-
});
16-
17-
gulp.task('test', ['babel'], () => {
18-
return gulp.src('test/*.js')
19-
.pipe(mocha())
20-
.on('error', () => {
21-
gulp.emit('end');
22-
});
23-
});
24-
25-
gulp.task('watch-test', () => {
26-
return gulp.watch(['src/**', 'test/**'], ['test']);
27-
});
28-
29-
gulp.task('webpack', ['test'], function(callback) {
30-
var myConfig = Object.create(webpackConfig);
31-
myConfig.plugins = [
32-
new webpack.optimize.DedupePlugin(),
33-
new webpack.optimize.UglifyJsPlugin()
34-
];
35-
36-
// run webpack
37-
webpack(myConfig, function(err, stats) {
38-
if (err) throw new gutil.PluginError('webpack', err);
39-
gutil.log('[webpack]', stats.toString({
40-
colors: true,
41-
progress: true
42-
}));
43-
callback();
44-
});
45-
});
46-
47-
/*
48-
gulp.task('server', ['webpack'], function(callback) {
49-
// modify some webpack config options
50-
var myConfig = Object.create(webpackConfig);
51-
myConfig.devtool = 'eval';
52-
myConfig.debug = true;
53-
54-
// Start a webpack-dev-server
55-
new WebpackDevServer(webpack(myConfig), {
56-
publicPath: '/' + myConfig.output.publicPath,
57-
stats: {
58-
colors: true
59-
},
60-
hot: true
61-
}).listen(8080, 'localhost', function(err) {
62-
if(err) throw new gutil.PluginError('webpack-dev-server', err);
63-
gutil.log('[webpack-dev-server]', 'http://localhost:8080/webpack-dev-server/index.html');
64-
});
65-
});*/
3+
import babel from 'babel-register';
4+
5+
6+
// Test
7+
exports.default = () => (gulp.src('test/test.js', { read : false })
8+
.pipe(mocha({
9+
reporter: 'list',
10+
require: ['babel-core/register']
11+
}))
12+
.on('error', function(err) {
13+
this.emit('end');
14+
})
15+
);
16+
17+
exports.test = () => (
18+
gulp.src(['test/test.js'], {read: false})
19+
.pipe(mocha({reporter: 'list', require: ['babel-core/register'], exit: true}))
20+
.on('error', console.error)
21+
);

license.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
url-knife
2-
https://github.com/Andrew-Kang-G/url-knife
2+
https://github.com/patternknife/url-knife
33

44
The MIT License (MIT)
55

6-
Copyright (c) 2019 Andrew-Kang-G
6+
Copyright (c) 2019 patternknife
77

88
Permission is hereby granted, free of charge, to any person obtaining a copy
99
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)