Skip to content

Tweaks and replaced sourcejs-react with sourcejs-react-bundle plugins #3

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"stage": 0
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.idea
*.iml
*.iml
node_modules
10 changes: 10 additions & 0 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Setup Instructions

You need to install NodeJS with NPM, go to [https://nodejs.org](https://nodejs.org/)

1. run `npm install`.
2. run `npm run start`.
3. open http://127.0.0.1:8080

If you need help setting SourceJS help, can can ask for help at the Gitter chat:
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/sourcejs/Source)
File renamed without changes.
29 changes: 7 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
# SourceJS Spec Page Showcase
# SourceJS Showcase

[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/sourcejs/Source)
Welcome to SourceJS the dynamic Style Guide platform. It allows to combine multiple project UI component libraries, based on many technologies.
Following Living Style Guide driven development, SourceJS allows you to code new components directly in the Style Guide.

View source code of component folders (`/default`, `/jade` and etc) and compare them with [rendered output](https://sourcejs.com/specs/example-specs-showcase/).
This catalogue repository showcases the use of SourceJS and it's plugins.
It demonstrates UI blocks (called specs), created with a variaty of technologies.

Examples are made for SourceJS 0.5.4+ version.
Examples are made for SourceJS 0.6.0+ version.

## Setup Instructions

1. [Install SourceJS](https://sourcejs.com/docs/base/#install).
2. Install SourceJS plugins [sourcejs-contrib-dss](https://github.com/sourcejs/sourcejs-contrib-dss), [sourcejs-jade](https://github.com/sourcejs/sourcejs-jade), [sourcejs-react](https://github.com/szarouski/sourcejs-react).
3. Checkout this repo contents as a nested folder in `sourcejs/user/specs`:

```
cd sourcejs/user/specs
git clone https://github.com/sourcejs/example-specs-showcase
```

Re-run SourceJS app, and open http://127.0.0.1:8080/specs/example-specs-showcase.

```
cd sourcejs
node app.js
open http://127.0.0.1:8080/specs/example-specs-showcase
```
For install instruction see [INSTALLATION.md](./INSTALLATION.md)
17 changes: 17 additions & 0 deletions assets/css/defaults.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.styleguide_welcome {
position: relative;
margin-bottom: 20px;
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
line-height: 1.5;
color: #999 !important;
}

.source_licence {
position: relative;
margin-bottom: 20px;
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
line-height: 1.5;
color: #999 !important;
}
14 changes: 0 additions & 14 deletions default/css/default.css

This file was deleted.

48 changes: 0 additions & 48 deletions default/index.src.html

This file was deleted.

5 changes: 0 additions & 5 deletions default/info.json

This file was deleted.

6 changes: 0 additions & 6 deletions dss/info.json

This file was deleted.

33 changes: 15 additions & 18 deletions index.src.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
<div class="source_subhead">
<h1>Examples Specs</h1>
<div class="source_catalog_tx">
<p>This Spec catalogue features showcase of SourceJS Spec features and it's plugins. View <a class="source-a_a" href="https://github.com/sourcejs/example-specs-showcase">source code</a> of this library to compare it with rendered results.</p>

<p>Navigation pages like this, are hand crafted, following <a href="https://sourcejs.com/docs/data-nav" class="source-a_a">Data Nav API</a>.</p>
</div>
<%- includeMD('README.md') %>
</div>

<div class="source_catalog" data-nav="./" data-tag="without-tag">
<h2>Native Specs</h2>
<ul class="source_catalog_list">
<img src="/source/assets/i/process.gif" alt="Loading..."/>
</ul>
</div>
<article class="styleguide_welcome">
<div class="source_catalog" data-nav="/">
</div>
</article>


<article class="source_licence">
<%- includeMD('INSTALLATION.md') %>
</article>

<hr/>

<div class="source_catalog" data-nav="./" data-tag="plugins">
<h2>Rendered With Plugins</h2>
<ul class="source_catalog_list">
<img src="/source/assets/i/process.gif" alt="Loading..."/>
</ul>
</div>
<article class="source_licence">
<%- includeMD('LICENSE.md') %>
</article>
6 changes: 3 additions & 3 deletions info.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"title": "Examples Specs",
"role": "navigation"
}
"title": "Source - Home",
"role": "navigation"
}
14 changes: 0 additions & 14 deletions jade/css/jade.css

This file was deleted.

32 changes: 0 additions & 32 deletions jade/index.jade

This file was deleted.

6 changes: 0 additions & 6 deletions jade/info.json

This file was deleted.

4 changes: 0 additions & 4 deletions jade/templates/group.jade

This file was deleted.

14 changes: 0 additions & 14 deletions markdown/css/markdown.css

This file was deleted.

5 changes: 0 additions & 5 deletions markdown/info.json

This file was deleted.

40 changes: 40 additions & 0 deletions options.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// User options for overriding core options.js

module.exports = {
// Restart the app after changing core (back-end) options
// Core options could be only redefined from user/options.js, context options are not supported
core: {
processMd: {
languageRenderers: {
jsx: require('sourcejs-react-styleguidist/core/lang-jsx').processExample
}
},
server: {
}
},

// Page rendering configuration (redefinable from context options)
rendering: {},

// Client-side options (redefinable from context options)
assets: {
modulesEnabled : {
// Overriding example
// trimSpaces: true
},

modulesOptions : {
// Modules options example
// navHighlight: {
// updateHash: false
// }
},

// Legacy options object support for some older plugins
pluginsOptions: {}
},

// External plugins options (are also exposed to client-side
plugins: {
}
};
24 changes: 24 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"version": "1.0.0",
"author": {
"name": "Norbert de Langen"
},
"description": "Example of pre-configured SourceJS instance for building a basic Styleguide / Documentation website.",
"scripts": {
"build-source": "cd ./node_modules/sourcejs && npm run build",
"start": "node ./node_modules/sourcejs/app.js -p $PORT"
},
"dependencies": {
"react": "^0.14.2",
"react-dom": "^0.14.2",
"sourcejs": "^0.6.0-nightly.6",
"sourcejs-contrib-dss": "^0.1.1",
"sourcejs-jade": "^0.0.2",
"sourcejs-react-docgen": "^0.3.0",
"sourcejs-react-styleguidist": "^0.4.0"
},
"devDependencies": {
"amdefine": "^1.0.0",
"express": "^4.13.3"
}
}
14 changes: 0 additions & 14 deletions react/css/react.css

This file was deleted.

Loading