Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #76 from medfreeman/standard-js
Browse files Browse the repository at this point in the history
Standardized module, i.e. added linter, and fixed nuxtent-body component
  • Loading branch information
alidcast authored Sep 23, 2017
2 parents 823a408 + 55c406b commit 0222f02
Show file tree
Hide file tree
Showing 41 changed files with 617 additions and 526 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

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

[*.md]
trim_trailing_whitespace = false
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
lib/plugins/nuxtentBodyComponent.template.js
dist/
nuxt/
28 changes: 28 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"root": true,
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 8,
"sourceType": "module"
},
"env": {
"node": true,
"es6": true
},
"plugins": [
"babel",
"ava"
],
"extends": [
"eslint-config-standard",
"eslint-config-i-am-meticulous",
"plugin:ava/recommended",
"eslint-config-prettier"
],
"rules": {
"curly": [
"error",
"all"
]
}
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Nuxtent

[![js-standard-style](https://cdn.rawgit.com/standard/standard/master/badge.svg)](http://standardjs.com)

The goal of Nuxtent is to make using Nuxt for content heavy sites as easy as using Jekyll, Hugo, or any other static site generator.

It does in two main ways:
Expand Down
26 changes: 0 additions & 26 deletions bin/nuxtent

This file was deleted.

74 changes: 0 additions & 74 deletions bin/nuxtent-generate

This file was deleted.

14 changes: 7 additions & 7 deletions docs/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ module.exports = {
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Nuxtent Documentation' }
{
hid: 'description',
name: 'description',
content: 'Nuxtent Documentation'
}
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
},
modules: [
'nuxtent'
],
modules: ['nuxtent'],
css: [
'prismjs/themes/prism-coy.css',
{ src: '~/assets/sass/base.sass', lang: 'sass' }
Expand Down
28 changes: 16 additions & 12 deletions docs/nuxtent.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,33 @@ module.exports = {
page: 'guide/_slug',
permalink: ':slug',
isPost: false,
generate: [
'get',
'getAll'
]
generate: ['get', 'getAll']
},

parsers: {
md: {
highlight: (code, lang) => {
return Prism.highlight(code, Prism.languages[lang] || Prism.languages.markup)
return Prism.highlight(
code,
Prism.languages[lang] || Prism.languages.markup
)
},
use: [
[externalLinks, {
target: '_blank',
rel: 'noopener'
}]
[
externalLinks,
{
target: '_blank',
rel: 'noopener'
}
]
]
}
},

api: {
baseURL: process.env.NODE_ENV === 'production'
? 'https://nuxtent.now.sh'
: 'http://localhost:3000'
baseURL:
process.env.NODE_ENV === 'production'
? 'https://nuxtent.now.sh'
: 'http://localhost:3000'
}
}
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"markdown-it-link-attributes": "^1.0.0",
"nuxt": "1.0.0-alpha.3",
"nuxtent": "0.2.59",
"prismjs": "^1.6.0"
"prismjs": "^1.8.1"
},
"scripts": {
"dev": "nuxt",
Expand Down
5 changes: 5 additions & 0 deletions examples/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
rules: {
"import/no-unresolved": 0
}
}
6 changes: 2 additions & 4 deletions examples/content-navigation/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ module.exports = {
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Nuxt.js project' }
],
]
},
modules: [
'nuxtent'
]
modules: ['nuxtent']
}
2 changes: 1 addition & 1 deletion examples/content-navigation/nuxtent.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
content: {
page: '/guide/_slug',
permalink: ":slug",
permalink: ':slug',
isPost: false
}
}
6 changes: 2 additions & 4 deletions examples/custom-build/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ module.exports = {
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Nuxt.js project' }
],
]
},
modules: [
'nuxtent'
]
modules: ['nuxtent']
}
20 changes: 13 additions & 7 deletions examples/custom-build/nuxtent.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
const Prism = require('prismjs')

module.exports = {
content: { // basic content configuration
content: {
// basic content configuration
permalink: ':slug',
isPost: false
},

parser: { // custom parser options
parser: {
// custom parser options
md: {
highlight: (code, lang) => {
return Prism.highlight(code, Prism.languages[lang] || Prism.languages.markup)
return Prism.highlight(
code,
Prism.languages[lang] || Prism.languages.markup
)
}
}
},

api: { // custom url for development and production builds
baseURL: process.env.NODE_ENV ?
'https://production-url.now.sh' :
'http://localhost:3000'
api: {
// custom url for development and production builds
baseURL: process.env.NODE_ENV
? 'https://production-url.now.sh'
: 'http://localhost:3000'
}
}
18 changes: 18 additions & 0 deletions examples/custom-build/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "nuxtent-example",
"version": "1.0.0",
"description": "nuxtent custom-build example",
"author": "Alid Castano <[email protected]>",
"dependencies": {
"@nuxtjs/axios": "^2.2.1",
"nuxt": "^1.0.0-rc3",
"nuxtent": "latest",
"prismjs": "^1.8.1"
},
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxtent generate"
}
}
4 changes: 1 addition & 3 deletions examples/i18n/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
module.exports = {
loading: { color: 'cyan' },
modules: [
'nuxtent'
]
modules: ['nuxtent']
}
5 changes: 1 addition & 4 deletions examples/i18n/nuxtent.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@ const contentOptions = {
}

module.exports = {
content: [
['en', contentOptions],
['fe', contentOptions]
]
content: [['en', contentOptions], ['fe', contentOptions]]
}
4 changes: 1 addition & 3 deletions examples/markdown-components/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
modules: [
'nuxtent'
]
modules: ['nuxtent']
}
2 changes: 1 addition & 1 deletion examples/markdown-components/nuxtent.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
content: {
page: '/_slug',
permalink: "/:slug",
permalink: '/:slug',
isPost: false,
generate: ['get']
}
Expand Down
4 changes: 1 addition & 3 deletions examples/multiple-content-types/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
modules: [
'nuxtent'
]
modules: ['nuxtent']
}
Loading

0 comments on commit 0222f02

Please sign in to comment.