Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: framework next steps #42

Merged
merged 3 commits into from
Aug 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions luci2-ui-core/src/.angular-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "luci-ng2"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"tsconfig": "tsconfig.app.json",
"prefix": "app",
"styles": [
"styles.scss"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"lint": [
{
"project": "src/tsconfig.app.json"
}
],
"defaults": {
"styleExt": "scss",
"component": {},
"serve": {
"proxyConfig": "proxy.conf.json"
}
}
}
13 changes: 13 additions & 0 deletions luci2-ui-core/src/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
42 changes: 42 additions & 0 deletions luci2-ui-core/src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
testem.log
/typings

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db
63 changes: 63 additions & 0 deletions luci2-ui-core/src/.stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{

"rules": {

"color-hex-case": "lower",
"color-no-invalid-hex": true,

"function-calc-no-unspaced-operator": true,
"function-comma-space-after": "always-single-line",
"function-comma-space-before": "never",
"function-name-case": "lower",
"function-url-quotes": "always",
"function-whitespace-after": "always",

"number-leading-zero": "always",
"number-no-trailing-zeros": true,

"string-no-newline": true,
"string-quotes": "single",

"unit-case": "lower",
"unit-no-unknown": true,
"unit-whitelist": ["px", "%", "deg", "ms", "em", "vh", "vw", "vmin"],

"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",

"shorthand-property-no-redundant-values": true,

"property-case": "lower",

"declaration-block-no-duplicate-properties": [ true, {
"ignore": ["consecutive-duplicates-with-different-values"]
}],
"declaration-block-trailing-semicolon": "always",
"declaration-block-single-line-max-declarations": 1,
"declaration-block-semicolon-space-before": "never",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-property-value-blacklist": [
{ "/.*/": ["initial"] },
{ "message": "The `initial` value is not supported in IE."}
],

"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always-multi-line",
"block-opening-brace-newline-after": "always-multi-line",
"block-opening-brace-space-before": "always-multi-line",

"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-pseudo-element-colon-notation": "double",
"selector-pseudo-element-no-unknown": true,
"selector-type-case": "lower"
}
}
30 changes: 30 additions & 0 deletions luci2-ui-core/src/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:4200",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:.+/~/*": "${webRoot}/node_modules/*",
"webpack:.+/src/*": "${webRoot}/src/*"
}

},
{
"type": "chrome",
"request": "attach",
"name": "Attach to Chrome",
"port": 9222,
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///.+/~/*": "${webRoot}/node_modules/*",
"webpack:///.+/src/*": "${webRoot}/src/*"
}
}
]
}
36 changes: 36 additions & 0 deletions luci2-ui-core/src/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Place your settings in this file to overwrite default and user settings.
{
"tslint.rulesDirectory": "./node_modules/tslint-eslint-rules/dist/rules",
"editor.tabSize": 2,
"stylelint.enable": true,
"css.validate": false,
"scss.validate": false,
"typescript.tsc.autoDetect": "off",
"typescript.referencesCodeLens.enabled": true,
"typescript.implementationsCodeLens.enabled": true,
"files.associations": {
".stylelintrc": "json"
},
"json.schemas": [
{
"fileMatch": [
"/.stylelintrc"
],
"url": "http://json.schemastore.org/stylelintrc"
}

],

"terminal.integrated.shellArgs.linux": [
"--rcfile",
".vscode/bashrc"
],
"tslint.exclude": "**/node_modules/**",
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true
}
}
38 changes: 38 additions & 0 deletions luci2-ui-core/src/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "lint",
"problemMatcher": [
{
"owner": "external",
"fileLocation": "absolute",
"pattern": [
{
"regexp": "^(/.*)$",
"file": 1
},
{
"regexp": "^(WARNING|ERROR):\\s+(\\d+):(\\d+)\\s+(.*)$",
"line": 2,
"column": 3,
"severity": 1,
"message": 4,
"loop": true
}
]
}
]
},
{
"type": "npm",
"script": "start",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
20 changes: 20 additions & 0 deletions luci2-ui-core/src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# LuciNg2

Luci-NG implementation using Angular 4 + Material 2.

## Install
You need `Node` and `Npm` installed in the development machine.

Run `npm install` to install all dependencies.

## Development server

Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

All `Ubus` calls are forwarded to the LEDE box using the settings in `proxy.conf.json`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.

Building of the ipk package is not yet implemented.
Loading