rodkndtest 2.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.
@@ -0,0 +1,50 @@
1
+ name: NodeJS with Webpack
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
+ branches: [ "master" ]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+
13
+ strategy:
14
+ matrix:
15
+ node-version: [22.x]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Use Node.js ${{ matrix.node-version }}
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: ${{ matrix.node-version }}
24
+
25
+ - name: Build
26
+ run: |
27
+ npm install
28
+ npx webpack
29
+
30
+ - name: Upload static files as artifact
31
+ id: deployment
32
+ uses: actions/upload-pages-artifact@v3
33
+ with:
34
+ path: dist/
35
+
36
+ deploy:
37
+ environment:
38
+ name: github-pages-artifact@v3
39
+ url: ${{ steps.deployment.outputs.page_url }}
40
+ runs-on: ubuntu-latest
41
+ needs: build
42
+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
43
+ permissions:
44
+ pages: write # to deploy to Pages
45
+ id-token: write # to verify the deployment originates from an appropriate source
46
+
47
+ steps:
48
+ - name: Deploy to Github pages
49
+ id: deployment
50
+ uses: actions/deploy-pages@v4
package/index.html CHANGED
@@ -7,7 +7,7 @@
7
7
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Oswald|Raleway:100" rel="stylesheet">
8
8
  <link rel="stylesheet" href="css/reset.css">
9
9
  <link rel="stylesheet" href="css/main.css">
10
- <script src="dist/bundle.js">
10
+ <script src="bundle.js">
11
11
  </script>
12
12
  </head>
13
13
  <body>
package/index.js CHANGED
@@ -2,9 +2,13 @@
2
2
 
3
3
  import moment from 'moment';
4
4
  import status from 'statuses';
5
+ import htmlUrl from './index.html';
6
+ import './css/reset.css';
7
+ import './css/main.css';
5
8
 
6
9
  console.log("Hello from Javascript! Latest");
7
10
  console.log(moment().startOf('day').fromNow());
11
+ console.log("HTML is available at:",htmlUrl);
8
12
 
9
13
  var name="Howard", time = "today";
10
14
  var code=status('forbidden');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rodkndtest",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "test",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/webpack.config.js CHANGED
@@ -1,21 +1,37 @@
1
1
  // webpack.config.js
2
+
3
+ const path = require('path');;
4
+
5
+
2
6
  module.exports = {
3
7
  entry: './index.js',
4
8
  output: {
5
- filename: 'bundle.js'
9
+ path: path.resolve(__dirname, 'dist'),
10
+ // clean: true,
11
+ filename: 'bundle.js',
6
12
  },
7
- /* module: {
13
+ module: {
8
14
  rules: [
9
15
  {
10
- test: /\.js$/,
11
- exclude: /node_modules/,
12
- use: {
13
- loader: 'babel-loader',
14
- options: {
15
- presets: ['env']
16
- }
17
- }
18
- }
19
- ]
20
- } */
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
+
21
37
  };
@@ -1,10 +0,0 @@
1
- /*!
2
- * statuses
3
- * Copyright(c) 2014 Jonathan Ong
4
- * Copyright(c) 2016 Douglas Christopher Wilson
5
- * MIT Licensed
6
- */
7
-
8
- //! moment.js
9
-
10
- //! moment.js locale configuration