@cycjimmy/hello-github-package-npm 6.2.0 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hello-world.umd.min.js +1 -1
- package/package.json +2 -47
- package/.babelrc +0 -8
- package/.browserslistrc +0 -12
- package/.editorconfig +0 -12
- package/.eslintignore +0 -3
- package/.eslintrc +0 -9
- package/.gitattributes +0 -2
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -41
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -17
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/coveralls.yml +0 -35
- package/.github/workflows/deploy2GhPages.yml +0 -30
- package/.github/workflows/nodeTestCI.yml +0 -59
- package/.github/workflows/release.yml +0 -93
- package/CODE_OF_CONDUCT.md +0 -76
- package/CONTRIBUTING.md +0 -2
- package/__mocks__/fileMock.mjs +0 -1
- package/__mocks__/styleMock.mjs +0 -1
- package/__test__/index.test.js +0 -8
- package/docs/CHANGELOG.md +0 -566
- package/jest.config.js +0 -16
- package/release.config.cjs +0 -17
- package/rollup/package.cjs +0 -1
- package/rollup/rollup.common.mjs +0 -47
- package/rollup/rollup.config.dev.mjs +0 -41
- package/rollup/rollup.config.prod.mjs +0 -28
- package/src/index.js +0 -14
- package/src/styles/index.scss +0 -22
- package/src/template/helloTemplate.js +0 -5
- package/static/favicon.ico +0 -0
- package/static/index.html +0 -17
- package/tasks/copyFiles.js +0 -26
- package/tasks/handlePackageJson.js +0 -47
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
|
|
2
|
-
/* eslint import/extensions: ["error", "ignorePackages", {"mjs": off}] */
|
|
3
|
-
import browsersync from 'rollup-plugin-browsersync';
|
|
4
|
-
import copy from 'rollup-plugin-copy';
|
|
5
|
-
|
|
6
|
-
import pkg from './package.cjs';
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
input, IS_DEVELOPMENT, IS_DEPLOYMENT, name, plugins,
|
|
10
|
-
} from './rollup.common.mjs';
|
|
11
|
-
|
|
12
|
-
export default [
|
|
13
|
-
{
|
|
14
|
-
input,
|
|
15
|
-
output: {
|
|
16
|
-
name,
|
|
17
|
-
file: pkg.browser.replace('.min.js', '.js'),
|
|
18
|
-
format: 'umd',
|
|
19
|
-
exports: 'default',
|
|
20
|
-
},
|
|
21
|
-
plugins: [
|
|
22
|
-
...plugins,
|
|
23
|
-
|
|
24
|
-
IS_DEPLOYMENT
|
|
25
|
-
&& copy({
|
|
26
|
-
hook: 'writeBundle',
|
|
27
|
-
targets: [
|
|
28
|
-
{
|
|
29
|
-
src: ['static/**/*', 'dist/**.umd.js'],
|
|
30
|
-
dest: '.publish',
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
}),
|
|
34
|
-
IS_DEVELOPMENT
|
|
35
|
-
&& browsersync({
|
|
36
|
-
server: ['static', 'dist'],
|
|
37
|
-
watch: true,
|
|
38
|
-
}),
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
];
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/* eslint import/extensions: ["error", "ignorePackages", {"mjs": off}] */
|
|
2
|
-
import pkg from './package.cjs';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
banner, input, name, plugins, terserPlugins,
|
|
6
|
-
} from './rollup.common.mjs';
|
|
7
|
-
|
|
8
|
-
export default [
|
|
9
|
-
{
|
|
10
|
-
input,
|
|
11
|
-
output: [
|
|
12
|
-
{ file: pkg.main, format: 'cjs', exports: 'default' },
|
|
13
|
-
{ file: pkg.module, format: 'es', exports: 'default' },
|
|
14
|
-
],
|
|
15
|
-
plugins,
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
input,
|
|
19
|
-
output: {
|
|
20
|
-
name,
|
|
21
|
-
file: pkg.browser,
|
|
22
|
-
format: 'umd',
|
|
23
|
-
banner,
|
|
24
|
-
exports: 'default',
|
|
25
|
-
},
|
|
26
|
-
plugins: [...plugins, terserPlugins],
|
|
27
|
-
},
|
|
28
|
-
];
|
package/src/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import helloTemplate from './template/helloTemplate';
|
|
2
|
-
import _style from './styles/index.scss';
|
|
3
|
-
|
|
4
|
-
const helloWorld = () => 'hello world!';
|
|
5
|
-
const helloElement = helloTemplate({
|
|
6
|
-
message: 'hello world!',
|
|
7
|
-
_style,
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
helloWorld,
|
|
12
|
-
helloElement,
|
|
13
|
-
_style,
|
|
14
|
-
};
|
package/src/styles/index.scss
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
@import "~@cycjimmy/sass-lib";
|
|
2
|
-
|
|
3
|
-
%blackBorder {
|
|
4
|
-
border: 1px solid black;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.helloWrapper {
|
|
8
|
-
@extend %flexCenter;
|
|
9
|
-
width: 500px;
|
|
10
|
-
height: 300px;
|
|
11
|
-
margin: auto;
|
|
12
|
-
|
|
13
|
-
@extend %blackBorder;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.hello {
|
|
17
|
-
@extend %flexCenter;
|
|
18
|
-
width: 80%;
|
|
19
|
-
height: 80%;
|
|
20
|
-
|
|
21
|
-
@extend %blackBorder;
|
|
22
|
-
}
|
package/static/favicon.ico
DELETED
|
Binary file
|
package/static/index.html
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
|
|
6
|
-
<link rel="shortcut icon" href="./favicon.ico">
|
|
7
|
-
<title>Hello World</title>
|
|
8
|
-
</head>
|
|
9
|
-
|
|
10
|
-
<body>
|
|
11
|
-
<script src="./hello-world.umd.js"></script>
|
|
12
|
-
<script>
|
|
13
|
-
console.log(helloWorld);
|
|
14
|
-
document.body.innerHTML += helloWorld.helloElement;
|
|
15
|
-
</script>
|
|
16
|
-
</body>
|
|
17
|
-
</html>
|
package/tasks/copyFiles.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
|
|
2
|
-
/* eslint no-console: 0 */
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import fs from 'fs-extra';
|
|
5
|
-
|
|
6
|
-
const { copy } = fs;
|
|
7
|
-
|
|
8
|
-
Promise.resolve()
|
|
9
|
-
.then(() => copy(
|
|
10
|
-
path.resolve('dist'),
|
|
11
|
-
path.resolve('package', 'dist'),
|
|
12
|
-
))
|
|
13
|
-
.then(() => copy(
|
|
14
|
-
path.resolve('README.md'),
|
|
15
|
-
path.resolve('package', 'README.md'),
|
|
16
|
-
))
|
|
17
|
-
.then(() => copy(
|
|
18
|
-
path.resolve('LICENSE'),
|
|
19
|
-
path.resolve('package', 'LICENSE'),
|
|
20
|
-
))
|
|
21
|
-
.then(() => {
|
|
22
|
-
console.log('copyFiles success!');
|
|
23
|
-
})
|
|
24
|
-
.catch((err) => {
|
|
25
|
-
console.error(err);
|
|
26
|
-
});
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
|
|
2
|
-
/* eslint no-console: 0 */
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import fs from 'fs-extra';
|
|
5
|
-
|
|
6
|
-
const { readJson, outputJson } = fs;
|
|
7
|
-
|
|
8
|
-
Promise.resolve()
|
|
9
|
-
.then(() => readJson(
|
|
10
|
-
path.resolve('package.json'),
|
|
11
|
-
))
|
|
12
|
-
.then((data) => {
|
|
13
|
-
const jsonData = data;
|
|
14
|
-
if (jsonData.scripts) {
|
|
15
|
-
delete jsonData.scripts;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (jsonData.dependencies) {
|
|
19
|
-
delete jsonData.dependencies;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (jsonData.devDependencies) {
|
|
23
|
-
delete jsonData.devDependencies;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (jsonData.publishConfig) {
|
|
27
|
-
delete jsonData.publishConfig;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (jsonData.config) {
|
|
31
|
-
delete jsonData.config;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return outputJson(
|
|
35
|
-
path.resolve('package', 'package.json'),
|
|
36
|
-
jsonData,
|
|
37
|
-
{
|
|
38
|
-
spaces: 2,
|
|
39
|
-
},
|
|
40
|
-
);
|
|
41
|
-
})
|
|
42
|
-
.then(() => {
|
|
43
|
-
console.log('handlePackageJson success!');
|
|
44
|
-
})
|
|
45
|
-
.catch((err) => {
|
|
46
|
-
console.error(err);
|
|
47
|
-
});
|