rodkndtest 1.0.0 → 2.0.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/css/reset.css CHANGED
@@ -1,47 +1,47 @@
1
- html, body, div, span, applet, object, iframe,
2
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3
- a, abbr, acronym, address, big, cite, code,
4
- del, dfn, em, img, ins, kbd, q, s, samp,
5
- small, strike, strong, sub, sup, tt, var,
6
- b, u, i, center, dl, dt, dd, ol, ul, li,
7
- fieldset, form, label, legend, table, caption,
8
- tbody, tfoot, thead, tr, th, td, article, aside,
9
- canvas, details, embed, figure, figcaption, footer,
10
- header, hgroup, menu, nav, output, ruby, section,
11
- summary, time, mark, audio, video {
12
- margin: 0;
13
- padding: 0;
14
- border: 0;
15
- font: inherit;
16
- vertical-align: baseline;
17
- }
18
- /* HTML5 display-role reset for older browsers */
19
- article, aside, details, figcaption, figure,
20
- footer, header, hgroup, menu, nav, section {
21
- display: block;
22
- }
23
- body {
24
- line-height: 1;
25
- }
26
- blockquote, q {
27
- quotes: none;
28
- }
29
- blockquote:before, blockquote:after,
30
- q:before, q:after {
31
- content: '';
32
- content: none;
33
- }
34
- table {
35
- border-collapse: collapse;
36
- border-spacing: 0;
37
- }
38
- strong, b {
39
- font-weight: bold;
40
- }
41
- em, i {
42
- font-style: italic;
43
- }
44
- a img {
45
- border: none;
46
- }
47
-
1
+ html, body, div, span, applet, object, iframe,
2
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3
+ a, abbr, acronym, address, big, cite, code,
4
+ del, dfn, em, img, ins, kbd, q, s, samp,
5
+ small, strike, strong, sub, sup, tt, var,
6
+ b, u, i, center, dl, dt, dd, ol, ul, li,
7
+ fieldset, form, label, legend, table, caption,
8
+ tbody, tfoot, thead, tr, th, td, article, aside,
9
+ canvas, details, embed, figure, figcaption, footer,
10
+ header, hgroup, menu, nav, output, ruby, section,
11
+ summary, time, mark, audio, video {
12
+ margin: 0;
13
+ padding: 0;
14
+ border: 0;
15
+ font: inherit;
16
+ vertical-align: baseline;
17
+ }
18
+ /* HTML5 display-role reset for older browsers */
19
+ article, aside, details, figcaption, figure,
20
+ footer, header, hgroup, menu, nav, section {
21
+ display: block;
22
+ }
23
+ body {
24
+ line-height: 1;
25
+ }
26
+ blockquote, q {
27
+ quotes: none;
28
+ }
29
+ blockquote:before, blockquote:after,
30
+ q:before, q:after {
31
+ content: '';
32
+ content: none;
33
+ }
34
+ table {
35
+ border-collapse: collapse;
36
+ border-spacing: 0;
37
+ }
38
+ strong, b {
39
+ font-weight: bold;
40
+ }
41
+ em, i {
42
+ font-style: italic;
43
+ }
44
+ a img {
45
+ border: none;
46
+ }
47
+
package/index.html CHANGED
@@ -1,17 +1,17 @@
1
- <!-- index.html -->
2
- <!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <title>Example with moment removed</title>
7
- <link href="https://fonts.googleapis.com/css?family=Open+Sans|Oswald|Raleway:100" rel="stylesheet">
8
- <link rel="stylesheet" href="css/reset.css">
9
- <link rel="stylesheet" href="css/main.css">
10
- <script src="bundle.js">
11
- </script>
12
- </head>
13
- <body>
14
- <h1>Hello from html!</h1>
15
- </body>
16
- </html>
17
-
1
+ <!-- index.html -->
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <title>Example with moment removed again</title>
7
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans|Oswald|Raleway:100" rel="stylesheet">
8
+ <link rel="stylesheet" href="css/reset.css">
9
+ <link rel="stylesheet" href="css/main.css">
10
+ <script src="bundle.js">
11
+ </script>
12
+ </head>
13
+ <body>
14
+ <h1>Hello from html!</h1>
15
+ </body>
16
+ </html>
17
+
package/index.js CHANGED
@@ -1,14 +1,18 @@
1
- // index.js
2
-
3
- import moment from 'moment';
4
- import status from 'statuses';
5
-
6
- console.log("Hello from Javascript! Latest");
7
- console.log(moment().startOf('day').fromNow());
8
-
9
- var name="Howard", time = "today";
10
- var code=status('forbidden');
11
- var msg=status[404];
12
- console.log(`Hello ${name}, how are you doing: ${time}?!!!`);
13
- console.log(`Errorcode is ${code}, errormsg is ${msg}.!?!` );
14
-
1
+ // index.js
2
+
3
+ import moment from 'moment';
4
+ import status from 'statuses';
5
+ import htmlUrl from './index.html';
6
+ import './css/reset.css';
7
+ import './css/main.css';
8
+
9
+ console.log("Hello from Javascript! Latest");
10
+ console.log(moment().startOf('day').fromNow());
11
+ console.log("HTML is available at:",htmlUrl);
12
+
13
+ var name="Howard", time = "today";
14
+ var code=status('forbidden');
15
+ var msg=status[404];
16
+ console.log(`Hello ${name}, how are you doing: ${time}?!!!`);
17
+ console.log(`Errorcode is ${code}, errormsg is ${msg}.!?!` );
18
+
package/package.json CHANGED
@@ -1,26 +1,22 @@
1
- {
2
- "name": "rodkndtest",
3
- "version": "1.0.0",
4
- "description": "test",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1",
8
- "build": "webpack --progress -p",
9
- "watch": "webpack --progress --watch",
10
- "server": "webpack-dev-server --open"
11
- },
12
- "author": "Howard",
13
- "license": "ISC",
14
- "repository": "github:rodkwithnasa/ndtest",
15
- "dependencies": {
16
- "moment": "^2.20.1",
17
- "statuses": "^1.4.0"
18
- },
19
- "devDependencies": {
20
- "babel-core": "^6.26.0",
21
- "babel-loader": "^7.1.2",
22
- "babel-preset-env": "^1.6.1",
23
- "webpack": "^3.10.0",
24
- "webpack-dev-server": "^2.11.1"
25
- }
26
- }
1
+ {
2
+ "name": "rodkndtest",
3
+ "version": "2.0.1",
4
+ "description": "test",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 0",
8
+ "build": "webpack",
9
+ "watch": "webpack --progress --watch"
10
+ },
11
+ "author": "Howard",
12
+ "license": "ISC",
13
+ "repository": "github:rodkwithnasa/ndtest",
14
+ "dependencies": {
15
+ "moment": "^2.20.1",
16
+ "statuses": "^1.4.0"
17
+ },
18
+ "devDependencies": {
19
+ "webpack": "^5.105.2",
20
+ "webpack-cli": "^6.0.1"
21
+ }
22
+ }
package/webpack.config.js CHANGED
@@ -1,21 +1,37 @@
1
- // webpack.config.js
2
- module.exports = {
3
- entry: './index.js',
4
- output: {
5
- filename: 'bundle.js'
6
- },
7
- module: {
8
- rules: [
9
- {
10
- test: /\.js$/,
11
- exclude: /node_modules/,
12
- use: {
13
- loader: 'babel-loader',
14
- options: {
15
- presets: ['env']
16
- }
17
- }
18
- }
19
- ]
20
- }
21
- };
1
+ // webpack.config.js
2
+
3
+ const path = require('path');;
4
+
5
+
6
+ module.exports = {
7
+ entry: './index.js',
8
+ output: {
9
+ path: path.resolve(__dirname, 'dist'),
10
+ // clean: true,
11
+ filename: 'bundle.js',
12
+ },
13
+ module: {
14
+ rules: [
15
+ {
16
+ test: /\.html$/,
17
+ type: 'asset/resource',
18
+ generator: {
19
+ // Emits the file as 'index.html' in the dist root
20
+ filename: '[name][ext]',
21
+ emit: true,
22
+ },
23
+ },
24
+ {
25
+ test: /\.css$/,
26
+ type: 'asset/resource',
27
+ sideEffects: true,
28
+ generator: {
29
+ // Moves files to 'dist/css/style.css' (or whatever they were named)
30
+ filename: 'css/[name][ext]',
31
+ emit: true,
32
+ },
33
+ },
34
+ ],
35
+ },
36
+
37
+ };