chore: cleanup unused directory
This commit is contained in:
@@ -1,21 +0,0 @@
|
|||||||
let ignore = [`**/dist`]
|
|
||||||
|
|
||||||
// Jest needs to compile this code, but generally we don't want this copied
|
|
||||||
// to output folders
|
|
||||||
if (process.env.NODE_ENV !== `test`) {
|
|
||||||
ignore.push(`**/__tests__`)
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
plugins: [
|
|
||||||
"@babel/plugin-proposal-class-properties",
|
|
||||||
"@babel/plugin-transform-instanceof",
|
|
||||||
],
|
|
||||||
presets: ["@babel/preset-env"],
|
|
||||||
env: {
|
|
||||||
test: {
|
|
||||||
plugins: ["@babel/plugin-transform-runtime"],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
ignore,
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"plugins": ["prettier"],
|
|
||||||
"extends": ["prettier"],
|
|
||||||
"rules": {
|
|
||||||
"prettier/prettier": "error",
|
|
||||||
"semi": "error",
|
|
||||||
"no-unused-expressions": "true"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
4
e2e/prod-project/.gitignore
vendored
4
e2e/prod-project/.gitignore
vendored
@@ -1,4 +0,0 @@
|
|||||||
/node_modules
|
|
||||||
/dist
|
|
||||||
.env
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"endOfLine": "lf",
|
|
||||||
"semi": false,
|
|
||||||
"singleQuote": false,
|
|
||||||
"tabWidth": 2,
|
|
||||||
"trailingComma": "es5"
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
plugins: [`medusa-payment-stripe`, `medusa-plugin-permissions`],
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "prod-project",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "Test project for testing production setup",
|
|
||||||
"main": "index.js",
|
|
||||||
"repository": {
|
|
||||||
"url": "https://github.com/medusajs/medusa",
|
|
||||||
"directory": "e2e/prod-project"
|
|
||||||
},
|
|
||||||
"author": "Sebastian Rindom",
|
|
||||||
"license": "GPL-3.0",
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/core": "^7.9.6",
|
|
||||||
"@babel/node": "^7.7.4",
|
|
||||||
"@babel/plugin-proposal-class-properties": "^7.7.4",
|
|
||||||
"@babel/plugin-transform-instanceof": "^7.8.3",
|
|
||||||
"@babel/plugin-transform-runtime": "^7.7.6",
|
|
||||||
"@babel/preset-env": "^7.7.5",
|
|
||||||
"@babel/register": "^7.7.4",
|
|
||||||
"@babel/runtime": "^7.7.6",
|
|
||||||
"cross-env": "^5.2.1",
|
|
||||||
"eslint": "^6.7.2",
|
|
||||||
"jest": "^24.9.0",
|
|
||||||
"nodemon": "^2.0.1",
|
|
||||||
"prettier": "^2.0.2",
|
|
||||||
"supertest": "^4.0.2"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@medusajs/medusa": "^0.1.27",
|
|
||||||
"bl": "^4.0.3",
|
|
||||||
"express": "^4.17.1",
|
|
||||||
"medusa-interfaces": "^0.1.27",
|
|
||||||
"medusa-payment-stripe": "^0.1.27",
|
|
||||||
"mongoose": "^5.9.12"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"start": "nodemon --watch plugins/ --watch src/ --exec babel-node node_modules/@medusajs/medusa/dist/app.js"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
import { Router } from "express"
|
|
||||||
|
|
||||||
export default () => {
|
|
||||||
const app = Router()
|
|
||||||
|
|
||||||
app.get("/project-root", async (req, res, next) => {
|
|
||||||
try {
|
|
||||||
const testService = req.scope.resolve("testService")
|
|
||||||
const newHi = await testService.sayHi()
|
|
||||||
res.status(200).json(newHi)
|
|
||||||
} catch (e) {
|
|
||||||
next(e)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
return app
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
import mongoose from "mongoose"
|
|
||||||
import { BaseModel } from "medusa-interfaces"
|
|
||||||
|
|
||||||
class TestModel extends BaseModel {
|
|
||||||
static modelName = "test"
|
|
||||||
|
|
||||||
static schema = {
|
|
||||||
title: { type: String, required: true },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default TestModel
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
import { BaseService } from "medusa-interfaces"
|
|
||||||
|
|
||||||
class TestService extends BaseService {
|
|
||||||
constructor({ testModel }) {
|
|
||||||
super()
|
|
||||||
|
|
||||||
this.testModel_ = testModel
|
|
||||||
}
|
|
||||||
|
|
||||||
async sayHi() {
|
|
||||||
const res = await this.testModel_.create({ title: "hi" })
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default TestService
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
class CartSubscriber {
|
|
||||||
constructor({ cartService, eventBusService }) {
|
|
||||||
this.eventBus_ = eventBusService
|
|
||||||
|
|
||||||
this.eventBus_.subscribe("cart.created", this.log)
|
|
||||||
this.eventBus_.subscribe("cart.updated", this.log)
|
|
||||||
}
|
|
||||||
|
|
||||||
async log(c) {
|
|
||||||
console.log(c)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default CartSubscriber
|
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user