0.1.6 • Published 6 years ago

dimension v0.1.6

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

Dimension Framework

A framework for rapidly building Progressive Web Apps

This Framework is in an alpha state

There is probably bugs and the API is susceptible to change

Run included sample app

Run git clone https://github.com/vacarsu/dimension.git

Navigate to the project and run npm install

Once npm has installed all dependencies run npm start

NPM package currently not yet up to date

Get Started

NPM

npm install dimension --save

Yarn

yarn add dimension

To create an app just do the following

import React, { Component, PropTypes } from 'react';
import { bootstrap, defaultTheme, DimApp, DimPage, DimPropTypes, DimState } from 'dimension';
import AppBar from 'material-ui/AppBar';

// The HomePage of your app
@DimPropTypes({
  test: PropTypes.string.isRequired
})
@DimState(['test'])
export default class HomePage extends Component {
  constructor(props) {
    super(props);
  }

  render() {
    console.log(this.props.test);
    return (
      <div>
        <AppBar
          style={{
            position: 'fixed',
            width: 'auto',
            height: '65px',
            right: '0px',
            left: '0px',
          }}
          title={this.props.test}
        />
      </div>
    )
  }
}

// The App container
// sets up the react router for you
// with material-ui, react-intl, and redux
// also add a service worker for offline functionality
@DimApp({
  pages: [
    { path: '/', component: HomePage },
  ],
  config: {
    theme: defaultTheme,          // The material-ui theme just import the default one or create your own
    locale: 'en',
    serviceWorker: '/worker.js',
    state: {
      /*store: reduxStore
      if you want to manage the redux store yourself, add the store directly
      without initialState and reducers*/
      initialState: initialState, // the initial state of your redux store
      reducers: {                 // Provide reducers separately, the decorator will combine them for you
        test
      }
    }
  }
})
export default class App extends Component {
  constructor(props) {
    super(props);
  }
}
// render the app on the screen or use react render directly.
bootstrap((<App />), document.getElementById('app'));

Documentation

Docs

MIT Licence

Copyright 2017 Alex Lopez

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.

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.29

7 years ago

0.0.28

7 years ago

0.0.27

7 years ago

0.0.26

7 years ago

0.0.25

7 years ago

0.0.24

7 years ago

0.0.23

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

1.0.0

7 years ago