Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
v1.0.0
  • Loading branch information
dan-harris authored Apr 16, 2019
2 parents cf19cfe + 9c99c14 commit 4409487
Show file tree
Hide file tree
Showing 109 changed files with 28,134 additions and 76 deletions.
27 changes: 27 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"react-hot-loader/babel",
["@babel/plugin-proposal-decorators", { "legacy": true }]
],
"env": {
"production": {
"plugins": [
["@babel/plugin-transform-modules-commonjs"],
"transform-react-remove-prop-types",
"@babel/plugin-transform-react-constant-elements",
"@babel/plugin-transform-react-inline-elements",
"@babel/plugin-transform-runtime",
["@babel/plugin-proposal-decorators", { "legacy": true }]
]
},
"test": {
"plugins": [
"@babel/plugin-transform-modules-commonjs"
]
}
}
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
24 changes: 24 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"extends":
- "formidable/configurations/es6-react"

"rules":
"max-len": 0
"no-magic-numbers": 0
"react/prefer-es6-class": 0
"react/no-multi-comp": 0
"quotes": [2, "single"]
"object-property-newline": 0
"valid-jsdoc": 0
"template-tag-spacing": 0
"arrow-parens": 0
"env":
"browser": true,
"node": true
"globals":
"afterEach": true,
"describe": true,
"expect": true,
"it": true,
"jest": true,
"test": true
65 changes: 4 additions & 61 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,61 +1,4 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
.DS_Store
node_modules
npm-debug.log
dist
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 140,
"singleQuote": true
}
27 changes: 13 additions & 14 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
MIT License
The MIT License (MIT)

Copyright (c) 2019 Dan Harris
Copyright (c) 2013

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
57 changes: 56 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,56 @@
# presentation-productively-productive
# Spectacle Boilerplate

## Contents

- [Reference](#reference)
- [Getting Started](#getting-started)
- [Tutorial](#tutorial)
- [Build & Deployment](#build-deployment)

## Reference

The Spectacle core API is available in the [Spectacle Docs](https://github.com/FormidableLabs/spectacle/blob/master/README.md).

## Getting Started

1. Download the boilerplate

```sh
git clone git@github.com:FormidableLabs/spectacle-boilerplate.git
```

2. Remove existing version control

```sh
rm -R .git
```

3. Install dependencies

```sh
yarn install
```

4. Start the webpack server. The server will run at [`localhost:3000`](http://localhost:3000).

```sh
yarn start
```

## Tutorial

If want you a step-by-step guide for getting started with Spectacle, a basic tutorial is available [here](https://github.com/FormidableLabs/spectacle/blob/master/docs/tutorial.md).

## Build & Deployment

Building the dist version of the project is as easy as running

```sh
yarn build
```

If you want to deploy the slideshow to surge, run

```sh
yarn deploy
```
6 changes: 6 additions & 0 deletions assets/arrow-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions assets/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions assets/arrow-underline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/code-examples/home-page-static.cshtml.cs.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

public class IndexModel : PageModel {

///
/// current order based on customer id (if we have it)
///
public PizzaGhostPizzeria.Models.Order Order { get; set; }

///
/// state object for client initial state
/// (let's us preload client side with modifiable state)
///
public JObject InitialState = new JObject();

private readonly OrderService _orderService;

private readonly IdentityService _identityService;

public IndexModel(
OrderService orderService,
IdentityService identityService
) {
_orderService = orderService;
_identityService = identityService;
}

public async Task OnGetAsync() {
// populate data
Order = await _orderService
.GetOrderByCustomerId(_identityService.CustomerId);
// set initial state
InitialState["order"] = JObject.FromObject(Order);
}
}
17 changes: 17 additions & 0 deletions assets/code-examples/home-page-static.cshtml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

@page
@model IndexModel
<!-- set some initial state -->
<pgp-client-state initial="@Model.InitialState"></pgp-client-state>

<!-- content wrapper -->
<div class="content-wrapper content-wrapper--centred">

<!-- scripts -->
<pgp-script client-script="page-home" inline></pgp-script>
<pgp-style client-style="page-home"></pgp-style>

<!-- pizzeria logo -->
<pgp-partial name="_logo"></pgp-partial>

</div>
28 changes: 28 additions & 0 deletions assets/code-examples/home-page-static.ts.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

@Injectable()
class HomePage {

@Query(".pgp-logo")
logoElement: HTMLElement;

constructor() {}

@Listen("click", ".pgp-logo")
onClickLogo(event: any) {
// add a class
this.logoElement.classList.add("rumble");
// set a timer for animations then remove class
setTimeout(
() =>
requestAnimationFrame(() =>
this.logoElement.classList.remove("rumble")
),
800
);
}
}

///
/// init the page
///
initPage<HomePage>(HomePage, []);
36 changes: 36 additions & 0 deletions assets/code-examples/jquery-static.js.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

///
/// query for our element
///
const myElement = $('.my-element');

///
/// native query for our element
///
const myElement = document.querySelector('.my-element');


///
/// add class
///
myElement.addClass('make-item-blue');

///
/// native add class
///
myElement.classList.add('make-item-blue');


///
/// handle element event
///
myElement.click(doSomething());
/// or
myElement.on('click', doSomething());

///
/// native handle element event
///
myElement.onclick(doSomething());
/// or
myElement.addEventListener('click', doSomething());
Loading

0 comments on commit 4409487

Please sign in to comment.