nodemon.json
{
"execMap": {
"js": "babel-node"
},
"env": {
"NODE_ENV": "development"
},
"ext": ".js,.jsx",| import React from 'react' | |
| import { Router } from 'express' | |
| import routes from 'shared/routes' | |
| import { readFileSync } from 'fs' | |
| import { resolve } from 'path' | |
| import cheerio from 'cheerio' | |
| import { StaticRouter } from 'react-router' | |
| import { renderToString, renderToStaticMarkup } from 'react-dom/server' | |
| function getTemplate() { |
| export function BuildError(object) { | |
| // Throw an error if the 'object' param doesn't pass the follow rules: | |
| // 1. If the object param is not an object | |
| // 2. If the object param doesn't include a property 'message' | |
| // 3. If the object param includes the property 'message' but is not of string type | |
| // 4. If the object param includes the property 'message' but it is empty | |
| if (!object.hasOwnProperty('message') || typeof object.message !== 'string') { | |
| throw new Error('Error when trying to build a new error'); | |
| } | |
| // Wrapper to get results & errors in parallel: | |
| // Here we could override the original Promise.all method but due to this is just merely a test, we'll just leave it aside. | |
| function promiseAll(array, combine) { | |
| return Promise.all(array.map(p => p.catch(e => e))) | |
| .then(values => { | |
| if (combine) { | |
| return values; | |
| } | |
| let errors = values.reduce((target, value) => { |
nodemon.json
{
"execMap": {
"js": "babel-node"
},
"env": {
"NODE_ENV": "development"
},
"ext": ".js,.jsx",| const pkg = require('package.json'); | |
| module.exports = { | |
| apps : [{ | |
| name : pkg.name, | |
| script : 'dist/index.js', | |
| output : 'logs/out/logs.log', | |
| error : 'logs/err/logs.log', | |
| log : 'logs/all/logs.log', | |
| instances : 0, |
| import 'package:equatable/equatable.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_redux/flutter_redux.dart'; | |
| import 'package:flutter_test/flutter_test.dart'; | |
| import 'package:meta/meta.dart'; | |
| import 'package:redux/redux.dart'; | |
| /// STATE: | |
| @immutable | |
| class AppState extends Equatable { |
| import 'dart:math' as math; | |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(Main()); | |
| class Main extends StatefulWidget { | |
| @override | |
| State<StatefulWidget> createState() => _MainState(); | |
| } |