nails-boilerplate 1.1.0 → 1.2.0
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/bin/lib/init.js +2 -1
- package/package.json +1 -1
- package/templates/common/readme_fetcher.js +1 -1
- package/templates/config/routes.js +1 -1
- package/templates/config/service.js +1 -1
- package/templates/package.json +1 -1
- package/templates/server/views/partials/javascripts.ejs +1 -1
- package/templates/server/views/partials/reactapp.ejs +1 -1
- package/templates/server/views/partials/styles.ejs +3 -2
- package/templates/{client/src → src}/app.jsx +1 -1
- package/templates/src/styles/appstyles.css +3 -0
- package/templates/vite.config.ts +2 -2
- /package/templates/{client → public}/README.xml +0 -0
- /package/templates/{client → public}/css/styles.css +0 -0
- /package/templates/{client → public}/download.jpg +0 -0
- /package/templates/{client → public}/favicon.ico +0 -0
- /package/templates/{client → public}/index.html +0 -0
- /package/templates/{client → public}/js/client.js +0 -0
- /package/templates/{client/src → src}/AboutPage.jsx +0 -0
- /package/templates/{client/src → src}/HomePage.jsx +0 -0
- /package/templates/{client/src → src}/Layout.jsx +0 -0
- /package/templates/{client/src → src}/ReadmePage.jsx +0 -0
- /package/templates/{client/src → src}/components/ReadmeLoader.jsx +0 -0
package/bin/lib/init.js
CHANGED
|
@@ -50,7 +50,8 @@ function createApp( name ) {
|
|
|
50
50
|
fs.closeSync(fd);
|
|
51
51
|
|
|
52
52
|
copySync(path.resolve(templateRoot, './server'), name + '/server');
|
|
53
|
-
copySync(path.resolve(templateRoot, './
|
|
53
|
+
copySync(path.resolve(templateRoot, './src'), name + '/src');
|
|
54
|
+
copySync(path.resolve(templateRoot, './public'), name + '/public');
|
|
54
55
|
copySync(path.resolve(templateRoot, './config'), name + '/config');
|
|
55
56
|
copySync(path.resolve(templateRoot, './common'), name + '/common');
|
|
56
57
|
copySync(path.resolve(templateRoot, './spec'), name + '/spec');
|
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@ export default [
|
|
|
21
21
|
// Routes the root request to index.html, as well as all other requests to static
|
|
22
22
|
['get', "/", {controller: 'home'}],
|
|
23
23
|
// Routes all requests starting with /public as static requests to the public folder.
|
|
24
|
-
['get', '/
|
|
24
|
+
['get', '/public', {public: true}],
|
|
25
25
|
// A test route which routes the first part of pathname to controller and the second to the action
|
|
26
26
|
['get', /^\/(\w+)\/(\w+)$/i, {0: 'controller', 1: 'action'}],
|
|
27
27
|
// Maps the first two parts of the path to controller and action, and the third to the id parameter
|
|
@@ -16,7 +16,7 @@ const CERTIFICATE_FILE = fs.readFileSync(`${import.meta.dirname}/ssl/certificate
|
|
|
16
16
|
var config = {
|
|
17
17
|
APP_ROOT: APP_ROOT,
|
|
18
18
|
// root directory for delivering static assets
|
|
19
|
-
PUBLIC_ROOT: SERVER_ROOT + '/
|
|
19
|
+
PUBLIC_ROOT: SERVER_ROOT + '/public',
|
|
20
20
|
CONTROLLERS_ROOT: APP_ROOT + '/controllers',
|
|
21
21
|
VIEWS_ROOT: APP_ROOT + '/views',
|
|
22
22
|
//MODELS_ROOT: APP_ROOT + '/models',
|
package/templates/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<script src="/
|
|
1
|
+
<script src="/public/js/client.js"></script>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<script src="/
|
|
1
|
+
<script src="/public/dist/nails-react-app.js" type="module"></script>
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
<link rel='shortcut icon' href='/
|
|
2
|
-
<link rel="stylesheet" href="/
|
|
1
|
+
<link rel='shortcut icon' href='/public/favicon.ico' type='image/x-icon' />
|
|
2
|
+
<link rel="stylesheet" href="/public/css/styles.css" />
|
|
3
|
+
<link rel="stylesheet" href="/public/dist/nails-react-app.css" />
|
package/templates/vite.config.ts
CHANGED
|
@@ -20,11 +20,11 @@ export default defineConfig({
|
|
|
20
20
|
},
|
|
21
21
|
build: {
|
|
22
22
|
lib: {
|
|
23
|
-
entry: '
|
|
23
|
+
entry: './src/app.jsx', // Your library's main entry file
|
|
24
24
|
name: 'NailsReactApp',
|
|
25
25
|
fileName: 'nails-react-app',
|
|
26
26
|
},
|
|
27
|
-
outDir: '
|
|
27
|
+
outDir: './public/dist',
|
|
28
28
|
},
|
|
29
29
|
esbuild: {
|
|
30
30
|
minifyIdentifiers: false,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|