This repository was archived by the owner on Aug 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
dev: create basic web server #8
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
965ddc6
dev: create common development scripts and config files
baocancode 93df9d8
dev: create basic API server
baocancode ccb4694
dev: create basic web server
baocancode 281f09e
Merge branch 'master' into 4-dev-create-basic-web-server
baocancode f6aa845
dev: allow to style with sass
baocancode 432d056
dev: use tsx
baocancode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.nuxt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# @webok/web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import path from 'path' | ||
import sass from 'sass' | ||
|
||
export const rootDir = __dirname | ||
|
||
export const srcDir = path.join(__dirname, 'src') | ||
|
||
export const server = { | ||
port: process.env.PORT || 4000, | ||
} | ||
|
||
export const build = { | ||
loaders: { | ||
scss: { | ||
implementation: sass, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "@webok/web", | ||
"version": "0.0.0", | ||
"repository": "https://github.com/webokio/webok/tree/master/packages/web", | ||
"scripts": { | ||
"clean": "webok-dev clean", | ||
"build:production": "nuxt-ts build", | ||
"format": "webok-dev format nuxt.config.ts", | ||
"postformat": "npm run tslint", | ||
"tslint": "webok-dev tslint", | ||
"publish:prepare": "npm run clean", | ||
"dev": "nuxt-ts" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"dependencies": { | ||
"vue-property-decorator": "^7.3.0" | ||
}, | ||
"devDependencies": { | ||
"@types/sass": "^1.16.0", | ||
"@webok/dev": "^0.0.0", | ||
"nuxt-ts": "^2.4.5", | ||
"sass": "^1.17.2", | ||
"sass-loader": "^7.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script lang="tsx"> | ||
import { Component, Vue } from 'vue-property-decorator' | ||
import { CreateElement } from 'vue' | ||
|
||
@Component({}) | ||
export default class HomePage extends Vue { | ||
appName: string = 'WebOK' | ||
|
||
render (h: CreateElement) { | ||
return ( | ||
<h1 class='blue'>Welcome to {this.appName}!</h1> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
) | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.blue { | ||
color: blue; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// JSX types definition, copied from https://medium.com/@hayavuk/using-jsx-with-vue-js-and-typescript-d6963e44de48 | ||
|
||
import Vue, { VNode } from 'vue' | ||
|
||
declare global { | ||
namespace JSX { | ||
interface Element extends VNode {} | ||
interface ElementClass extends Vue {} | ||
interface IntrinsicElements { | ||
[elem: string]: any | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": "./node_modules/@webok/dev/tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "lib", | ||
"target": "es5", | ||
"module": "es2015", | ||
"moduleResolution": "node", | ||
"jsx": "preserve" | ||
}, | ||
"include": [ | ||
"src/**/*", | ||
"nuxt.config.ts" | ||
], | ||
"exclude": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "./node_modules/@webok/dev/tslint.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"compilerOptions": { | ||
"experimentalDecorators": true, | ||
"allowJs": true | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dummy file to avoid Vetur error during development, suggested by vuejs/vetur#815 (comment) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sass is the new implementation to replace node-sass