Skip to content

Commit

Permalink
Merge pull request #18 from cyclejs-community/v2
Browse files Browse the repository at this point in the history
Upgrade starter to v2
  • Loading branch information
artfuldev authored Oct 19, 2017
2 parents a2e5b27 + 7f2d57a commit d29f78f
Show file tree
Hide file tree
Showing 31 changed files with 5,819 additions and 114 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,3 @@ jspm_packages

# Generated files
dist

# Typings
typings/
20 changes: 5 additions & 15 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Chrome against localhost, with sourcemaps",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"sourceMaps": true,
"webRoot": "${workspaceRoot}",

//This line is important, since it instructs chrome to run in a separate, sandbox instance.
//This way, other running chrome instances won't prevent remote debugging from running.
"userDataDir": "C:\\temp\\chrome-dev-instance"
},
{
"name": "Attach to Chrome, with sourcemaps",
"type": "chrome",
"request": "attach",
"port": 9222,
"sourceMaps": true,
"name": "Launch Chrome against localhost",
"url": "http://localhost:3030",
"webRoot": "${workspaceRoot}"
}
]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Cycle.js Community
Copyright (c) 2017 Sudarsan Balaji and Cycle.js Community

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
48 changes: 32 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
# typescript-starter-cycle
A simple project for getting started with TypeScript in cycle.js, using Webpack.
An opinionated starter for Cycle.js projects powered by TypeScript.

## Patterns
* Simple Starter - this branch
* [Model-View-Intent (MVI) Starter](https://github.com/cyclejs-community/typescript-starter-cycle/tree/add-model-view-intent-pattern)
* [MVI with Reducers Starter](https://github.com/cyclejs-community/typescript-starter-cycle/tree/add-reducer-pattern)
* [MVI with Property Streams Starter](https://github.com/cyclejs-community/typescript-starter-cycle/tree/add-property-stream-pattern)
## Opinions
* TypeScript rocks. We use TypeScript as much as possible.
* Visual Studio Code rocks. We use Visual Studio Code as the recommended editor.
* Webpack rocks. We use webpack only.

<br>
<br>
<br>
<br>
<hr>
## Features
* TypeScript
* Webpack
* TypeStyle for styles
* Simple routing with layouts
* Hot Module Reloading
* Async imports and dynamic routing
* Visual Studio Code integrations

##### Visual Studio Code Specifics
This repository has workspace settings and launch configuration for [Visual Studio Code](https://code.visualstudio.com/) as candy. The launch configuration will only work when the [Debugger for Chrome extension](https://code.visualstudio.com/blogs/2016/02/23/introducing-chrome-debugger-for-vs-code) is installed. The [npm Script Runner extension](https://marketplace.visualstudio.com/items?itemName=eg2.vscode-npm-script) for Visual Studio Code is also recommended.
### Planned
* Unit testing with Mocha and Chai
* UI Integration tests with Cypress
* Explanation of folder structure
* Wiki section on recommended/best practices
* Better README (duh!)

For a quickstart guide/tutorial, see [here](https://journal.artfuldev.com/cycle-js-quick-start-with-typescript-and-webpack-in-visual-studio-code-e562a009e9d6#.qpn2b7vkl)
## Notes

##### Notes
> If hosting on github-pages, you need to remove `dist` entry in the `.gitignore` file.
### Visual Studio Code Specifics
This repository is optimized for [Visual Studio Code](https://code.visualstudio.com/).
We have launch configurations, an editor config file, and workspace settings.

To make full use of these, you need the following extensions:
* [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome)
* [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)

### Troubleshooting / Tips
* If using on Windows machines, make sure you have the [build tools](https://github.com/felixrieseberg/windows-build-tools) ready before doing an `npm install`.
* If hosting on a subdirectory, you need to change the `PROJECT_PUBLIC_PATH` in `webpack.config.js` only for production. You can do this by changing line #32 of the file to `var PROJECT_PUBLIC_PATH = __PROD__ ? '<your-public-path-here>' : '/';`
* If you need help with something, or have feedback, suggestions, feel free to open an issue on this repository.
Loading

0 comments on commit d29f78f

Please sign in to comment.