removes dist, moves all exporter files to /src
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
export { default as App } from './src/components/App';
|
||||
export { default as Button } from './src/components/controls/Button';
|
||||
export { default as MeasureWindow } from './src/components/utilities/MeasureWindow';
|
||||
export { default as MeasureScroll } from './src/components/utilities/MeasureScroll';
|
||||
export { default as LoadContent } from './src/components/utilities/LoadContent';
|
||||
export { default as Dashboard } from './src/components/views/Dashboard';
|
||||
export { default as CollectionRoutes } from './src/components/routes/Collections';
|
||||
export { default as DefaultTemplate } from './src/components/layout/DefaultTemplate';
|
||||
export { default as Login } from './src/components/views/Login';
|
||||
export { default as AddView } from './src/components/views/collections/Add';
|
||||
export { default as ArchiveView } from './src/components/views/collections/Archive';
|
||||
export { default as HeadingButton } from './src/components/modules/HeadingButton';
|
||||
export { default as Filter } from './src/components/modules/Filter';
|
||||
export { default as EditView } from './src/components/views/collections/Edit';
|
||||
export { default as StickOnScroll } from './src/components/layout/StickOnScroll';
|
||||
export { default as APIUrl } from './src/components/modules/APIUrl';
|
||||
export { default as Form, FormContext } from './src/components/forms/Form';
|
||||
export { default as FormSubmit } from './src/components/forms/Submit';
|
||||
export { default as Group } from './src/components/field-types/Group';
|
||||
export { default as Input } from './src/components/field-types/Input';
|
||||
export { default as Textarea } from './src/components/field-types/Textarea';
|
||||
export { default as PayloadIcon } from './src/components/graphics/PayloadIcon';
|
||||
export { default as PayloadLogo } from './src/components/graphics/PayloadLogo';
|
||||
export { default as Tooltip } from './src/components/modules/Tooltip';
|
||||
export { default as Sidebar } from './src/components/layout/Sidebar';
|
||||
export { default as StepNav } from './src/components/modules/StepNav';
|
||||
export { default as Arrow } from './src/components/graphics/Arrow';
|
||||
export { default as Label } from './src/components/type/Label';
|
||||
export { default as SetStepNav } from './src/components/utilities/SetStepNav';
|
||||
export { default as ContentBlock } from './src/components/layout/ContentBlock';
|
||||
@@ -88,7 +88,7 @@ module.exports = {
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
payload: path.resolve(__dirname, '../'),
|
||||
payload: path.resolve(__dirname, '../src/'),
|
||||
local: path.resolve(__dirname, '../demo')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const httpStatus = require('http-status');
|
||||
const passport = require('passport');
|
||||
const APIError = require('../../dist/lib/helpers/APIError');
|
||||
const APIError = require('../../src/lib/helpers/APIError');
|
||||
const User = require('../User/User.model');
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
const Page = require('./Page.model');
|
||||
|
||||
const pageController = {
|
||||
get: (req, res, next) => {
|
||||
page.find((err, pages, next) => {
|
||||
get: (req, res) => {
|
||||
Page.find((err, pages, next) => {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
@@ -10,10 +10,8 @@ const pageController = {
|
||||
});
|
||||
},
|
||||
|
||||
post: (req, res, next) => {
|
||||
|
||||
post: (req, res) => {
|
||||
const newPage = new Page(req.body);
|
||||
|
||||
newPage.save((err, page, next) => {
|
||||
if (err) {
|
||||
return next(err);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const mongoose = require('mongoose');
|
||||
const httpStatus = require('http-status');
|
||||
const passportLocalMongoose = require('passport-local-mongoose');
|
||||
const APIError = require('../../dist/lib/helpers/APIError');
|
||||
const APIError = require('../../src/lib/helpers/APIError');
|
||||
|
||||
/**
|
||||
* User Schema
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
const payload = require('../dist');
|
||||
const mongoose = require('mongoose');
|
||||
const express = require('express');
|
||||
const payloadConfig = require('./payload.config');
|
||||
@@ -33,8 +32,6 @@ app.use((req, res, next) => {
|
||||
next();
|
||||
});
|
||||
|
||||
payload.init(app);
|
||||
|
||||
app.listen(payloadConfig.port, () => {
|
||||
console.log(`listening on ${payloadConfig.port}...`);
|
||||
});
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
"scripts": {
|
||||
"test": "node ./node_modules/jest/bin/jest.js src/tests",
|
||||
"cov": "npm run core:build && node ./node_modules/jest/bin/jest.js src/tests --coverage",
|
||||
"core:watch": "./node_modules/.bin/babel src --out-dir dist --source-maps --watch",
|
||||
"core:build": "./node_modules/.bin/babel src --out-dir dist --source-maps",
|
||||
"build-demo-css": "node-sass-chokidar --include-path ./src/scss demo/ -o demo/",
|
||||
"watch-demo-css": "npm run build-demo-css && node-sass-chokidar --include-path ./src/scss demo/ -o demo/ --watch --recursive",
|
||||
"build-module-css": "node-sass-chokidar --include-path ./src/scss src/ -o src/",
|
||||
|
||||
7
redux.js
7
redux.js
@@ -1,7 +0,0 @@
|
||||
import common from './src/reducers/common';
|
||||
import collections from './src/reducers/collections';
|
||||
|
||||
export {
|
||||
common,
|
||||
collections
|
||||
};
|
||||
29
src/components.js
Normal file
29
src/components.js
Normal file
@@ -0,0 +1,29 @@
|
||||
export { default as App } from './components/App';
|
||||
export { default as Button } from './components/controls/Button';
|
||||
export { default as MeasureWindow } from './components/utilities/MeasureWindow';
|
||||
export { default as MeasureScroll } from './components/utilities/MeasureScroll';
|
||||
export { default as Dashboard } from './components/views/Dashboard';
|
||||
export { default as CollectionRoutes } from './components/routes/Collections';
|
||||
export { default as DefaultTemplate } from './components/layout/DefaultTemplate';
|
||||
export { default as Login } from './components/views/Login';
|
||||
export { default as AddView } from './components/views/collections/Add';
|
||||
export { default as ArchiveView } from './components/views/collections/Archive';
|
||||
export { default as HeadingButton } from './components/modules/HeadingButton';
|
||||
export { default as Filter } from './components/modules/Filter';
|
||||
export { default as EditView } from './components/views/collections/Edit';
|
||||
export { default as StickOnScroll } from './components/layout/StickOnScroll';
|
||||
export { default as APIUrl } from './components/modules/APIUrl';
|
||||
export { default as Form, FormContext } from './components/forms/Form';
|
||||
export { default as FormSubmit } from './components/forms/Submit';
|
||||
export { default as Group } from './components/field-types/Group';
|
||||
export { default as Input } from './components/field-types/Input';
|
||||
export { default as Textarea } from './components/field-types/Textarea';
|
||||
export { default as PayloadIcon } from './components/graphics/PayloadIcon';
|
||||
export { default as PayloadLogo } from './components/graphics/PayloadLogo';
|
||||
export { default as Tooltip } from './components/modules/Tooltip';
|
||||
export { default as Sidebar } from './components/layout/Sidebar';
|
||||
export { default as StepNav } from './components/modules/StepNav';
|
||||
export { default as Arrow } from './components/graphics/Arrow';
|
||||
export { default as Label } from './components/type/Label';
|
||||
export { default as SetStepNav } from './components/utilities/SetStepNav';
|
||||
export { default as ContentBlock } from './components/layout/ContentBlock';
|
||||
@@ -1 +1 @@
|
||||
export { init } from './lib/payload';
|
||||
export { default as ajax } from './ajax';
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
class api {
|
||||
constructor(express, mongoose) {
|
||||
this.express = express;
|
||||
this.mongoose = mongoose;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = api;
|
||||
@@ -1,4 +1,4 @@
|
||||
import httpStatus from 'http-status';
|
||||
const httpStatus = require('http-status');
|
||||
|
||||
/**
|
||||
* @extends Error
|
||||
@@ -31,4 +31,4 @@ class APIError extends ExtendableError {
|
||||
}
|
||||
}
|
||||
|
||||
export default APIError;
|
||||
module.exports = APIError;
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
export function init(app) {
|
||||
console.log('initialized')
|
||||
}
|
||||
7
src/redux.js
Normal file
7
src/redux.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import common from './reducers/common';
|
||||
import collections from './reducers/collections';
|
||||
|
||||
export {
|
||||
common,
|
||||
collections
|
||||
};
|
||||
Reference in New Issue
Block a user