Refactor endpoint tests
Replace force_login calls with login call from client class in setUp
This commit is contained in:
parent
61702e720a
commit
858f84aaad
132 changed files with 5158 additions and 661 deletions
28
gulp/babel.js
Normal file
28
gulp/babel.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import path from 'path';
|
||||
|
||||
import { dest } from 'gulp';
|
||||
import babelify from 'babelify';
|
||||
import browserify from 'browserify';
|
||||
import source from 'vinyl-source-stream';
|
||||
import buffer from 'vinyl-buffer';
|
||||
import concat from 'gulp-concat';
|
||||
|
||||
const PROJECT_DIR = path.join('src', 'newsreader');
|
||||
const STATIC_DIR = path.join(PROJECT_DIR, 'js');
|
||||
const CORE_DIR = path.join(PROJECT_DIR, 'news', 'core', 'static');
|
||||
|
||||
const babelTask = () => {
|
||||
const config = browserify({
|
||||
entries: `${STATIC_DIR}/homepage/index.js`,
|
||||
debug: true,
|
||||
}).transform(babelify);
|
||||
|
||||
return config
|
||||
.bundle()
|
||||
.pipe(source('index.js'))
|
||||
.pipe(buffer())
|
||||
.pipe(concat('homepage.js'))
|
||||
.pipe(dest(`${CORE_DIR}/core/dist/js/`));
|
||||
};
|
||||
|
||||
export default babelTask;
|
||||
30
gulp/sass.js
30
gulp/sass.js
|
|
@ -1,17 +1,25 @@
|
|||
import { src, dest } from "gulp";
|
||||
import { src, dest } from 'gulp';
|
||||
|
||||
import concat from "gulp-concat";
|
||||
import path from "path";
|
||||
import sass from "gulp-sass";
|
||||
import concat from 'gulp-concat';
|
||||
import path from 'path';
|
||||
import sass from 'gulp-sass';
|
||||
|
||||
const PROJECT_DIR = path.join("src", "newsreader");
|
||||
const STATIC_DIR = path.join(PROJECT_DIR, "static");
|
||||
const PROJECT_DIR = path.join('src', 'newsreader');
|
||||
const STATIC_DIR = path.join(PROJECT_DIR, 'scss');
|
||||
|
||||
export const ACCOUNTS_DIR = path.join(PROJECT_DIR, "accounts", "static");
|
||||
export const ACCOUNTS_DIR = path.join(PROJECT_DIR, 'accounts', 'static');
|
||||
export const CORE_DIR = path.join(PROJECT_DIR, 'news', 'core', 'static');
|
||||
|
||||
export default function accountsTask(){
|
||||
return src(`${STATIC_DIR}/src/scss/accounts/index.scss`)
|
||||
.pipe(sass().on("error", sass.logError))
|
||||
.pipe(concat("accounts.css"))
|
||||
export const accountsTask = () => {
|
||||
return src(`${STATIC_DIR}/accounts/index.scss`)
|
||||
.pipe(sass().on('error', sass.logError))
|
||||
.pipe(concat('accounts.css'))
|
||||
.pipe(dest(`${ACCOUNTS_DIR}/accounts/dist/css`));
|
||||
};
|
||||
|
||||
export const coreTask = () => {
|
||||
return src(`${STATIC_DIR}/homepage/index.scss`)
|
||||
.pipe(sass().on('error', sass.logError))
|
||||
.pipe(concat('core.css'))
|
||||
.pipe(dest(`${CORE_DIR}/core/dist/css`));
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue