diff --git a/demo/nodefony/.eslintignore b/demo/nodefony/.eslintignore
new file mode 100644
index 0000000..c8d9abb
--- /dev/null
+++ b/demo/nodefony/.eslintignore
@@ -0,0 +1,15 @@
+assets
+**/assets/**
+app/Resources/public/assets/
+app/Resources/views/base.html.twig
+config/generatedConfig.yml
+app/Resources/databases/*
+web/*
+
+node_modules
+**/node_modules/**
+
+**/workbox-*
+**/hot/*
+**/service-worker.js
+
diff --git a/demo/nodefony/.eslintrc.js b/demo/nodefony/.eslintrc.js
new file mode 100644
index 0000000..1048e39
--- /dev/null
+++ b/demo/nodefony/.eslintrc.js
@@ -0,0 +1,97 @@
+module.exports = {
+ root: true,
+ env: {
+ browser: true,
+ node: true,
+ commonjs: true,
+ es2021: true
+ },
+ // Extends: ["standard"],
+ extends: [
+ "plugin:vue/vue3-essential",
+ // 'eslint:recommended',
+ "eslint:all"
+ // 'standard'
+ ],
+ plugins: ["prettier"],
+ overrides: [],
+ parserOptions: {
+ ecmaVersion: "latest",
+ sourceType: "module"
+ },
+ globals: {
+ nodefony: true,
+ kernel: true,
+ process: true,
+ require: true,
+ console: true,
+ module: true,
+ exports: true,
+ yaml: true,
+ util: true,
+ fs: true,
+ path: true,
+ cluster: true,
+ xmlParser: true,
+ async: true,
+ crypto: true,
+ Sequelize: true,
+ url: true,
+ http: true,
+ https: true,
+ pm2: true,
+ WebSocketServer: true,
+ nodedomain: true,
+ dns: true,
+ Promise: true,
+ zone: true,
+ it: true,
+ describe: true,
+ before: true,
+ beforeEach: true,
+ BlueBird: true,
+ twig: true,
+ shell: true,
+ clc: true,
+ notDefinded: true,
+ varNotExit: true,
+ window: true,
+ document: true,
+ navigator: true,
+ stage: true,
+ $: true,
+ jQuery: true,
+ Rx: true,
+ inquirer: true,
+ workbox: true
+ },
+ rules: {
+ "no-console": process.env.NODE_ENV === "production"
+ ? "warn"
+ : "off",
+ "no-debugger": process.env.NODE_ENV === "production"
+ ? "warn"
+ : "off",
+ "quotes": ["error", "double"],
+ "max-len": ["error", {"code": 150}],
+ "padded-blocks": ["error", "never"],
+ "id-length": ["error", {min: 1}],
+ "indent": ["error", 2],
+ "function-call-argument-newline": ["error", "consistent"],
+ "array-bracket-newline": ["error", "consistent"],
+ "quote-props": [0],
+ "no-return-await": [0],
+ "sort-keys": [0],
+ "array-element-newline": [0],
+ "dot-location": [0],
+ "multiline-comment-style": [0],
+ "capitalized-comments": [0],
+ "max-lines-per-function": ["warn", 100],
+ "no-await-in-loop": [0],
+ "max-statements": ["warn", 20],
+ "no-magic-numbers": [0],
+ "sort-vars": ["off"],
+ "no-ternary": ["off"],
+ "multiline-ternary": ["error", "always-multiline"]
+ }
+};
diff --git a/demo/nodefony/.gitignore b/demo/nodefony/.gitignore
index ecccecf..69f2bde 100644
--- a/demo/nodefony/.gitignore
+++ b/demo/nodefony/.gitignore
@@ -11,6 +11,7 @@ app/Resources/databases/*
node_modules/**
**/node_modules/**
npm-debug.log
+pnpm-lock.yaml
*.[oa]
config/certificates/**/*
diff --git a/demo/nodefony/.jshintignore b/demo/nodefony/.jshintignore
deleted file mode 100644
index 3c3629e..0000000
--- a/demo/nodefony/.jshintignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/demo/nodefony/.jshintrc b/demo/nodefony/.jshintrc
deleted file mode 100644
index 75d86aa..0000000
--- a/demo/nodefony/.jshintrc
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "esversion": 8,
- "node": true,
- "undef": true,
- "unused": true,
- "boss": true,
- "eqeqeq": true,
- "curly": true,
- "loopfunc": true,
- "multistr": true,
- "browser": true,
- "node": true,
- "shelljs": true,
- "globals": {
- "nodefony": true,
- "kernel": true,
- "process": true,
- "require": true,
- "console": true,
- "module": true,
- "exports": true,
- "kernel": true,
- "yaml": true,
- "util": true,
- "fs": true,
- "path": true,
- "cluster": true,
- "xmlParser": true,
- "async": true,
- "crypto": true,
- "Sequelize": true,
- "url": true,
- "http": true,
- "https": true,
- "pm2": true,
- "WebSocketServer": true,
- "nodedomain": true,
- "dns": true,
- "Promise": true,
- "zone": true,
- "it": true,
- "describe": true,
- "before": true,
- "beforeEach": true,
- "BlueBird": true,
- "twig": true,
- "shell": true,
- "clc": true,
- "notDefinded": true,
- "varNotExit": true,
- "window": true,
- "document": true,
- "navigator": true,
- "stage": true,
- "$": true,
- "jQuery": true,
- "Rx": true,
- "inquirer": true
- }
-}
diff --git a/demo/nodefony/README.md b/demo/nodefony/README.md
index 1871ae1..69ddb6a 100644
--- a/demo/nodefony/README.md
+++ b/demo/nodefony/README.md
@@ -1,19 +1,16 @@
![](https://github.com/nodefony/nodefony/raw/master/src/nodefony/bundles/framework-bundle/Resources/public/images/nodefony-logo.png)
-NODEFONY V6
+NODEFONY V7
[![npm package](https://nodei.co/npm/nodefony.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/nodefony)
[![Issues Status](https://img.shields.io/github/issues/nodefony/nodefony.svg)](https://github.com/nodefony/nodefony/issues) [![Build Status](https://github.com/nodefony/nodefony/workflows/nodefony/badge.svg)](https://github.com/nodefony/nodefony/actions) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/495/badge)](https://bestpractices.coreinfrastructure.org/projects/495)
-Nodefony is Node.js full-stack web framework.
+Nodefony is Node.js full-stack web framework.
Nodefony can be used to develop a complete solution to create a Fullstack Web Application, Secure Api, or Microservices.
-The Nodefony project is inspired by the PHP Symfony framework, a developer can find most of the concepts, configurations and patterns of Symfony framework.
-
-Nodefony is not an exhaustive port of symfony !
## Table of content
@@ -67,7 +64,7 @@ Nodefony is not an exhaustive port of symfony !
- [Passport](http://passportjs.org/) Simple, unobtrusive authentication for Node.js .
- ~~[Angular](https://github.com/angular/angular-cli) Experimental Bundle Generator ( Angular cli no longer allows the ejection of a webpack config)~~
-**Nodefony 6 adds the following features** :
+**Nodefony 7 adds the following features** :
- [React](https://github.com/facebookincubator/create-react-app) Experimental Bundle Generator ( Now an React Project can be merge into a Nodefony Bundle )
- [Vue.js](https://vuejs.org) Experimental Bundle Generator ( Now an Vue.js Project can be merge into a Nodefony Bundle )
@@ -77,10 +74,12 @@ Nodefony is not an exhaustive port of symfony !
Evolution priorities for the next version will focus on robustness, unit testing, documentation and security.
+You can follow Nodefony build with github actions at ****
-#### Nodefony is ported with ECMAScript 6 ( Class, Inheritance ).
+## Nodefony implement modules with CommonJS and ECMAScript 6 ( Class, Inheritance ).
+The development framework will not be ported to typescript, but will wait for the version with type syntax in Emacsript
-You can follow Nodefony build with github actions at ****
+**[proposal-type-annotations](https://github.com/tc39/proposal-type-annotations)**
## **Resources for Newcomers**
@@ -100,7 +99,7 @@ You can follow Nodefony build with github actions at **= 8 )
-- **[npm](https://www.npmjs.com/)** or **[yarn](https://yarnpkg.com/lang/en/)** Packages Manager for javascript application
+- **[npm](https://www.npmjs.com/)** or **[yarn](https://yarnpkg.com/lang/en/)** or **[pnpm](https://pnpm.io/cli/install)** Packages Manager for javascript application
- **[nvm](https://github.com/nvm-sh/nvm/)** Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
@@ -128,21 +127,21 @@ You can follow Nodefony build with github actions at ** Linux or OSX Installation (Recommanded)
+## Linux or OSX Installation
**[NVM](https://github.com/nvm-sh/nvm#installation-and-update) Installation (Node Version Manager )** :
- [NVM](https://github.com/creationix/nvm) Node Version Manager - Simple bash script to manage multiple active node.js versions
To install or update nvm, you can use the install script:
```sh
-curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
+curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
# or
-wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
+wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
$ source ~/.bashrc # or source ~/.bash_profile
-$ nvm ls-remote # show all remote versions
+$ nvm ls-remote # show all remote versions
$ nvm ls # show local versions
```
@@ -198,7 +197,7 @@ C:\Users\myuser\AppData\Roaming\npm\bin
**Cli command when use Global installation**
```bash
$ nodefony -v
-6.0.0
+7.0.0
```
**Cli command when By using yarn or npm in trunk**
@@ -212,7 +211,8 @@ npm run nodefony
**By using npx**
***note: npx is included with npm > v5.2 or can be installed separately.***
```bash
-npx nodefony
+npx nodefony -v
+7.0.0-beta.10
```
**The long way with the full path**
@@ -245,17 +245,17 @@ YOU CAN USE CLI NO INTERACTIVE (nodefony with args) :
```bash
# CLI generate project name : myproject
-$ nodefony create myproject
+$ npx nodefony create myproject
$ cd myproject
```
**Cli Help** :
```bash
-$ nodefony -h
+$ npx nodefony -h
-nodefony
- create [-i] name [path] Create New Nodefony Project
+nodefony
+ create [-i] name [path] Create New Nodefony Project
```
## Build Project with Github Starter :
@@ -264,9 +264,9 @@ nodefony
Clone nodefony starter
```bash
- $ git clone https://github.com/nodefony/nodefony.git
+ $ git clone https://github.com/nodefony/nodefony-starter.git
$ cd nodefony
- $ nodefony build
+ $ npx nodefony build
...
...
$ npm start
@@ -275,7 +275,7 @@ nodefony
YOU CAN USE CLI INTERACTIVE MODE TO BUILD PROJECT (nodefony without args)
```bash
- $ git clone https://github.com/nodefony/nodefony.git
+ $ git clone https://github.com/nodefony/nodefony-starter.git
$ cd nodefony
$ ls -l
-rw-r--r-- 1 cci staff 21306 27 mar 19:22 README.md
@@ -290,7 +290,7 @@ nodefony
drwxr-xr-x 12 cci staff 384 29 mar 11:01 web
-rw-r--r-- 1 cci staff 542660 27 mar 19:24 yarn.lock
- $ nodefony
+ $ npx nodefony
? Nodefony CLI : (Use arrow keys)
❯ Build Project
@@ -307,7 +307,7 @@ nodefony
**Starting Development Servers** :
```bash
-$ nodefony dev
+$ npx nodefony dev
# TO STOP
$
@@ -315,7 +315,7 @@ $
**Starting Development Servers in Debug Mode (-d)** :
```bash
-$ nodefony -d dev
+$ npx nodefony -d dev
# TO STOP
$
@@ -326,14 +326,14 @@ OR YOU CAN USE CLI INTERACTIVE MODE (nodefony without args)
_ _ ___ ____ _____ _____ ___ _ _ __ __
| \ | | / _ \ | _ \ | ____| | ___| / _ \ | \ | | \ \ / /
| \| | | | | | | | | | | _| | |_ | | | | | \| | \ V /
-| |\ | | |_| | | |_| | | |___ | _| | |_| | | |\ | | |
-|_| \_| \___/ |____/ |_____| |_| \___/ |_| \_| |_|
+| |\ | | |_| | | |_| | | |___ | _| | |_| | | |\ | | |
+|_| \_| \___/ |____/ |_____| |_| \___/ |_| \_| |_|
Version : 4.0.0 Platform : linux Process : nodefony PID : 31635
Fri Jul 27 2018 17:01:11 INFO nodefony : WELCOME PROJECT : myproject 1.0.0
-? Nodefony CLI :
+? Nodefony CLI :
❯ Start Servers Development
Start Servers Pre-Production
Start Servers Production
@@ -355,6 +355,8 @@ Fri Jul 27 2018 17:01:11 INFO nodefony : WELCOME PROJECT : myproject 1.0.0
$ npm -g install npx
$ npx --node-arg=--inspect nodefony dev
+// new version npx > 7
+$ npx --node-options=--inspect nodefony dev
# check chrome://inspect in your browser
```
@@ -363,23 +365,23 @@ $ npx --node-arg=--inspect nodefony dev
**Starting a Nodefony project with [PM2](http://pm2.keymetrics.io/)** :
```bash
-$ nodefony prod
+$ npx nodefony prod
or
-$ nodefony start
+$ npx nodefony start
```
Tools PM2 You can see PM2 config : config/pm2.config.js
```bash
# To See log
-$ nodefony logs
+$ npx nodefony logs
# To List Status of Production projects
-$ nodefony list
+$ npx nodefony list
# TO KILL PM2 DEAMON
-$ nodefony kill
+$ npx nodefony kill
# TO STOP APPLICATION WITHOUT KILL PM2 DEAMON
-$ nodefony stop
+$ npx nodefony stop
# YOU can use all pm2 command by using
$ yarn pm2 monit
@@ -391,7 +393,7 @@ $ npm run pm2 logs --lines 200
**Checking a Nodefony Project Pre-Production (Usefull to check Clusters Node)** :
```bash
-$ nodefony preprod
+$ npx nodefony preprod
```
## Serving a Nodefony project with HTTPS or WSS
@@ -417,7 +419,7 @@ You can find certificate authority (ca) here:
#### Access to Secure App with URL :
#### Access to App with URL :
-[![nodefony](https://raw.githubusercontent.com/nodefony/nodefony/master/src/nodefony/bundles/documentation-bundle/Resources/public/images/nodefony.png)](https://nodefony.net)
+[![nodefony](https://raw.githubusercontent.com/nodefony/nodefony/master/src/nodefony/bundles/monitoring-bundle/Resources/public/images/nodefony.png)](https://nodefony.net)
## Framework Configurations
@@ -592,7 +594,7 @@ class defaultController extends nodefony.Controller {
indexAction() {
return this.render("hello-bundle::index.html.twig", {
name: this.bundle.name,
- description: this.bundle.package.description
+ description: this.bundle.package.description
});
}
}
@@ -714,7 +716,7 @@ module.exports = webpackMerge(config, {
Access to monitoring route with URL :
-[![MONITORING](https://raw.githubusercontent.com/nodefony/nodefony/master/src/nodefony/doc/cluster.png)](https://nodefony.net/nodefony)
+[![MONITORING](https://raw.githubusercontent.com/nodefony/nodefony/master/src/nodefony/bundles/monitoring-bundle/Resources/public/images/monitor.png)](https://nodefony.net/nodefony)
Monitoring in progress !!!
diff --git a/demo/nodefony/app/Resources/scss/app.scss b/demo/nodefony/app/Resources/scss/app.scss
new file mode 100644
index 0000000..9c7e844
--- /dev/null
+++ b/demo/nodefony/app/Resources/scss/app.scss
@@ -0,0 +1,60 @@
+@import url(https://fonts.googleapis.com/css?family=Comfortaa);
+@import url(https://fonts.googleapis.com/css?family=Gochi+Hand);
+
+.hello {
+ text-align: center;
+}
+
+.hello h1 {
+ font-family: 'Gochi Hand', cursive;
+ color: #0167b8;
+ letter-spacing: 0;
+ font-size: 4em;
+ text-transform: none;
+}
+
+.nodefony{
+ font-family: 'Comfortaa', cursive;
+}
+
+.nodefony h1 {
+ text-align: center;
+ font-family: 'Gochi Hand', cursive;
+ color: #0167b8;
+ letter-spacing: 0;
+ font-size: 4em;
+ text-transform: none;
+}
+
+pre {
+ display: block;
+ padding: 9.5px;
+ margin: 0 0 10px;
+ font-size: 13px;
+ line-height: 1.42857143;
+ color: #333;
+ word-break: break-all;
+ word-wrap: break-word;
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+}
+
+.nodefony-signin {
+ width: 100%;
+ max-width: 330px;
+ padding: 15px;
+ margin: 0 auto;
+}
+
+.mt-6{
+ margin-top: ($spacer * 4) !important;;
+}
+
+.mt-7{
+ margin-top: ($spacer * 4.5) !important;;
+}
+
+.mt-8{
+ margin-top: ($spacer * 5) !important;;
+}
diff --git a/demo/nodefony/app/Resources/scss/awesome/font-awesome.config.js b/demo/nodefony/app/Resources/scss/awesome/font-awesome.config.js
new file mode 100644
index 0000000..8d7fe8e
--- /dev/null
+++ b/demo/nodefony/app/Resources/scss/awesome/font-awesome.config.js
@@ -0,0 +1,11 @@
+ module.exports = {
+ styles: {
+ "mixins": true,
+
+ "core": true,
+ "icons": true,
+
+ "larger": true,
+ "path": true,
+ }
+ };
\ No newline at end of file
diff --git a/demo/nodefony/app/Resources/scss/custom.scss b/demo/nodefony/app/Resources/scss/custom.scss
new file mode 100644
index 0000000..3c58a9f
--- /dev/null
+++ b/demo/nodefony/app/Resources/scss/custom.scss
@@ -0,0 +1,21 @@
+@import "~bootstrap/scss/bootstrap";
+
+$fa-font-path: "~font-awesome/fonts";
+@import '~font-awesome/scss/font-awesome.scss';
+//@import './awesome/font-awesome.config.js';
+
+@import "./app.scss";
+
+// Custom.scss
+// Option B: Include parts of Bootstrap
+// Required
+/*@import "node_modules/bootstrap/scss/functions";
+@import "node_modules/bootstrap/scss/variables";
+@import "node_modules/bootstrap/scss/mixins";
+
+// Optional
+@import "node_modules/bootstrap/scss/reboot";
+@import "node_modules/bootstrap/scss/type";
+@import "node_modules/bootstrap/scss/images";
+@import "node_modules/bootstrap/scss/code";
+@import "node_modules/bootstrap/scss/grid";*/
diff --git a/demo/nodefony/app/Resources/views/framework-bundle/views/index.html.twig b/demo/nodefony/app/Resources/views/framework-bundle/views/index.html.twig
index 37a86fe..b629a9e 100644
--- a/demo/nodefony/app/Resources/views/framework-bundle/views/index.html.twig
+++ b/demo/nodefony/app/Resources/views/framework-bundle/views/index.html.twig
@@ -1,6 +1,6 @@
{% extends "./base.html.twig" %}
{% block body %}
-
+
{% block content %}{% endblock %}
{% endblock %}
diff --git a/demo/nodefony/app/Resources/views/framework-bundle/views/layout.html.twig b/demo/nodefony/app/Resources/views/framework-bundle/views/layout.html.twig
index 4572339..bcd9c68 100644
--- a/demo/nodefony/app/Resources/views/framework-bundle/views/layout.html.twig
+++ b/demo/nodefony/app/Resources/views/framework-bundle/views/layout.html.twig
@@ -6,118 +6,120 @@
{% block content %}
{{ parent() }}
-
-
-
-
-
![]({{CDN("image")}}/app/images/app-logo.png)
-
{{ error.code }} - {{ error.message }}
-
-
-
-