Code Monkey home page Code Monkey logo

vortigern's People

Contributors

alexandr-bbm avatar altaywtf avatar angularsen avatar ardani avatar arnarp avatar batuhan avatar bherila avatar btomala avatar cedmax avatar dmitry-korolev avatar eputtone avatar felix93 avatar jagielskip avatar lavatoaster avatar liukun avatar matb avatar patroza avatar pedropovedaq avatar psrebniak avatar rjmunro avatar ufukomer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vortigern's Issues

Including example of .jsx component

When writing applications it is often that you find code that is written in JavaScript instead of Typescript.

Would it be possible to include an example component written in plain JavaScript? I tried this with a component as follows:

src/app/components/MyComponent/MyComponent.jsx:

import * as React from 'react';

class MyComponent extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <h1>Hello from MyComponent</h1>
        );
    }
}

export { MyComponent };

and included it in the file src/app/components/index.tsx as follows:

export { Header } from './Header/Header';
export {MyComponent } from './MyComponent/MyComponent';

But i keep getting the error:

ERROR in ./src/app/components/index.tsx
(2,28): error TS2307: Cannot find module './MyComponent/MyComponent'.

Another thing is using existing ReactJS libraries, like https://onsen.io/v2/react.html. How we leverage these existing libraries without writing type definition files?

background url(./barbar.png) doesn't work

When using background image in CSS, e.g:

.home {
    text-align: center;
    background: url('./barbar.png')
}

the compiled CSS seems to resolve the asset fine, however the browser is trying to load it relatively to the blob:// css file which was injected to the HEAD causing an incorrect host name by Chrome

Isomorphic style loader

I'm noticing a flicker on the screen when loading a new page with caching disabled. I think it's because when the server side renders the page it does not include styles. Eventually, when the styles are downloaded the elements are repositioned to their correct locations. It would be better to include the styles with the server side rendering so there is no flicker.

I found a package that appears to solve this problem called isomorphic-style-loader. It appears to be a replacement for style-loader. https://github.com/kriasoft/isomorphic-style-loader. Would people be open to this upgrade?

Time to discuss again: common repo

Including the internal project we are doing right now, upcoming vortigen-basic , vortigern-electron and Simpleserver/Riathamus, we'll have 5 TypeScript + React projects.

Is it time to pack common files in to a repository and publish it as a package?

npm start / npm run start fails due to NODE_ENV not found

Hello,
I wanted to give vortgern a try and did the following:

$ git clone https://github.com/barbar/vortigern
$ cd vortigern
$ npm run setup

everything worked so far.

Now I am getting an error when trying to start it:

$ npm start

Here is a screenshot of the console output:
image

I am using windows 10.
My node version is V4.4.3
My npm version is 3.8.2

I couldn't find anything on google regarding my issue. I hope you can help me. Thanks!

Cheers,
Raphael Hippe

Why not CSS Preprocessor?

Any reason not to use SCSS (or even LESS if you want)?

Sass SCSS seems to be the popular choice of CSS preprocessing in React projects.

Error building on first try

I just cloned the repo. I ran npm install and it installed all the dependencies successfully. However when I ran npm start, it throws the following error:

-- /build/server.js:70 --
var manifest = webpack_require(!(function webpackMissingModule() { var e = new Error("Cannot find module "../build/manifest.json""); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
Error: Cannot find module "../build/manifest.json"

It looks like the manifest.json file isn't being created in the build folder.

Do you guys think I might I messed up while cloning, or missed a step?

Thanks.

npm start failed under windows

under pure windows w/o cygwin installed npm start is failed in package.json->scripts->clean, there is "clean": "rm -rf build/"

Hot reload on server side

Hi I'll start by saying great starter kit! I'm really liking the Typescript. I've got this running on my dev machine and I'm trying to do a hot module replacement. It looks like the code is updated automatically on the client side, but the node server is not updated.

As a test, I edited Home/index.tsx and replaced "Hello" with "Hello2!", and then saved the file. At this point webpack builds and the browser is updated through HMR.

[HMR] connected
client.js:127 [HMR] bundle rebuilding
client.js:130 [HMR] bundle rebuilt in 2495ms
process-update.js:27 [HMR] Checking for updates on the server...
process-update.js:100 [HMR] Updated modules:
process-update.js:102 [HMR]  - ./src/app/containers/Home/index.tsx
process-update.js:107 [HMR] App is up to date.

When I refresh the page to trigger a server-side rendering I get the following error message:

warning.js:44 Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
 (client) a-reactid="15">Hello2!</p></div></sectio
 (server) a-reactid="15">Hello!</p></div></section

It appears that the server has the older version of the file. The only way I found to update it is by restarting the server. Does hot reloading on the server side work for other people? If so, it might be something wrong about my system configuration that I should investigate. If this is not supported, should we consider adding it?

add unit tests for components

Hi @altayaydemir,

What about the unit test for every component. I have seen the test structure prepared for ts but not seen for every component-specific ones.

Thanks.

Keep cool.

write wiki

no such file or directory, stat 'favicon.ico'

when running npm run build:prod and trying to run the server.js file inside the build folder i get this message:

Error: ENOENT: no such file or directory, stat '/Users/username/projects/vortigern/build/favicon.ico' at Error (native) at Object.fs.statSync (fs.js:892:18) at favicon (/Users/username/projects/vortigern/node_modules/serve-favicon/index.js:64:15) at Object.module.exports.config.env (/Users/username/projects/vortigern/build/server.js:97:10) at __webpack_require__ (/Users/username/projects/vortigern/build/server.js:21:30) at module.exports.Object.assign.i (/Users/username/projects/vortigern/build/server.js:41:18) at Object.<anonymous> (/Users/username/projects/vortigern/build/server.js:44:10) at Module._compile (module.js:425:26) at Object.Module._extensions..js (module.js:432:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:313:12) at Function.Module.runMain (module.js:457:10) at startup (node.js:138:18) at node.js:974:3

support Electron (or not?)

I'll convert barbar/riothamus to TypeScript and couldn't decide if I should push the Electron-specific edits back to Vortigern or fork Vortigern to create another boilerplate for Electron.

Any ideas?

server-side rendering / client-side rendering out of sync

I'm getting the following error:

warning.js:44 Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
 (client) om MyComponent</h1><ons-button data-reac
 (server) om MyComponent</h1></div></section>

It is clear that what is rendered at server side is not equal to what was rendered at client side.

What I did was including an existing ReactJS component library called react-onsenui (see https://onsen.io/v2/react.html).

I added to both the client.tsx file and the server.tsx file the following lines:

require('onsenui/css/onsenui.css');
require('onsenui/css/onsen-css-components.css');
require('onsenui');

and in the Home.tsx container I did:

import * as React from 'react';
const s = require('./style.css');

const Button = require('react-onsenui').Button;

class Home extends React.Component<any, any> {
  constructor(props) {
    super(props);
    this.handleButtonClick = this.handleButtonClick.bind(this);
  }

  handleButtonClick() {
    console.log("CLICKED");
  }

  render() {
    return (
      <div className={s.home}>
        <img src={require('./barbar.png')} />
        <p>Hello world!</p>
        <Button onClick={this.handleButtonClick}>MY BUTTON</Button>
      </div>
    );
  }
}
export { Home }

What do I need to do to keep client and server rendering in sync?

add style linter

only for styles written within the app directory, otherwise we may have to deal with vendor css problems.

nested css classes disappear after running npm run build:prod

I use nested classes in some of my css files like this:

.foo { & .nested {} }

and in the tsx file i use it like this:

`const s = require('./style.css');

div className={s.nested}
`

it runs smoothly in dev mode, but all of these classes disappear from the css after the build

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.