Skip to content

Commit

Permalink
Merge pull request #1239 from complexdatacollective/6.4.2-cordova
Browse files Browse the repository at this point in the history
6.4.2 cordova
  • Loading branch information
jthrilly authored Aug 31, 2023
2 parents 6d4a38e + 7ae9795 commit 093cdbc
Show file tree
Hide file tree
Showing 144 changed files with 8,032 additions and 5,144 deletions.
3 changes: 3 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Electron 9.2.0
ChromeAndroid >= 84
iOS >= 13.6
97 changes: 0 additions & 97 deletions .sass-lint.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "stylelint-config-standard-scss",
"rules": {
"selector-class-pattern": null,
"custom-property-pattern": null,
"scss/at-extend-no-missing-placeholder": null
}
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"scss.validate": false,
"stylelint.validate": [
"css",
"scss"
],
}
27 changes: 7 additions & 20 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget android-versionCode="6229" id="org.codaco.NetworkCanvasInterviewer6" ios-CFBundleIdentifier="org.codaco.networkCanvasInterviewerBusiness" ios-CFBundleVersion="6229" version="6.4.2" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget android-versionCode="6374" id="org.codaco.NetworkCanvasInterviewer6" ios-CFBundleIdentifier="org.codaco.networkCanvasInterviewerBusiness" ios-CFBundleVersion="6374" version="6.5.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Network Canvas Interviewer</name>
<description>
A tool for conducting Network Canvas Interviews.
Expand All @@ -18,7 +18,7 @@
<platform name="android">
<allow-intent href="market:*"/>
<allow-navigation href="https://*/*"/>
<hook src="scripts/cordova/prebuild-android.js" type="before_build"/>
<uses-permission android:name="android.permission.INTERNET"/>
<icon density="ldpi" src="www/icons/android/NC-Round-ldpi.png"/>
<icon density="mdpi" src="www/icons/android/NC-Round-mdpi.png"/>
<icon density="hdpi" src="www/icons/android/NC-Round-hdpi.png"/>
Expand All @@ -35,18 +35,13 @@
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity">
<activity android:exported="true"/>
</edit-config>
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/provider">
<provider android:exported="true"/>
</edit-config>
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/receiver">
<receiver android:exported="true"/>
</edit-config>
</platform>
<platform name="ios">
<allow-navigation href="*"/>
<allow-navigation href="*"/>
<allow-navigation href="*"/>
<preference name="WKWebViewOnly" value="true"/>
<preference name="Allow3DTouchLinkPreview" value="false"/>
<preference name="scheme" value="app"/>
<preference name="hostname" value="localhost"/>
<allow-intent href="itms:*"/>
<allow-intent href="itms-apps:*"/>
<config-file parent="NSBonjourServices" target="*-Info.plist">
Expand All @@ -69,29 +64,21 @@
<icon height="1024" src="www/icons/ios/NC-Square-1024.png" width="1024"/>
<splash src="www/icons/ios/Default@2x~universal~anyany.png"/>
</platform>
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine"/>
</feature>
<preference name="Orientation" value="landscape"/>
<preference name="target-device" value="tablet"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="Fullscreen" value="true"/>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="AndroidPersistentFileLocation" value="Internal"/>
<preference name="iosPersistentFileLocation" value="Library"/>
<preference name="AllowInlineMediaPlayback" value="true"/>
<preference name="android-minSdkVersion" value="24"/>
<preference name="android-targetSdkVersion" value="31"/>
<plugin name="cordova-plugin-file-transfer" spec="^1.7.1"/>
<preference name="android-targetSdkVersion" value="33"/>
<preference name="resizeOnFullScreen" value="true"/>
<plugin name="cordova-plugin-device" spec="^2.0.2"/>
<plugin name="cordova-plugin-zeroconf" spec="^1.4.1"/>
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.0"/>
<plugin name="cordova-plugin-inappbrowser" spec="~4.0.0"/>
<plugin name="cordova-plugin-network-information" spec="~2.0.2"/>
<plugin name="cordova-plugin-chooser" spec="~1.3.1"/>
<plugin name="cordova-plugin-wkwebview-engine" spec="~1.2.1"/>
<plugin name="cordova-plugin-network-canvas-client" spec="https://github.com/complexdatacollective/cordova-plugin-network-canvas-client.git"/>
<plugin name="cordova-sqlite-storage" spec="6.0.0"/>
<engine name="ios" spec="~5.1.1"/>
</widget>
63 changes: 4 additions & 59 deletions config/webpack.config.dev.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable global-require */

const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
Expand Down Expand Up @@ -209,64 +209,8 @@ module.exports = {
}],
},
{
test: /\.scss$/,
use: [
{
loader: require.resolve('thread-loader'),
options: {
poolTimeout: Infinity,
},
},
require.resolve('style-loader'),
{
loader: require.resolve('css-loader'),
options: {
importLoaders: 1,
},
},
{
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebookincubator/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes')
],
},
},
{
loader: require.resolve('sass-loader'),
},
],
},
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader turns CSS into JS modules that inject <style> tags.
// In production, we use a plugin to extract that CSS to a file, but
// in development "style" loader enables hot editing of CSS.
{
test: /\.css$/,
use: [
require.resolve('style-loader'),
{
loader: require.resolve('css-loader'),
options: {
importLoaders: 1,
},
},
{
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebookincubator/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes')
],
},
},
],
test: /\.s?css$/i,
use: [MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader', 'sass-loader'],
},
// "file" loader makes sure those assets get served by WebpackDevServer.
// When you `import` an asset, you get its (virtual) filename.
Expand Down Expand Up @@ -323,6 +267,7 @@ module.exports = {
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new MiniCssExtractPlugin(),
],
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
Expand Down
76 changes: 6 additions & 70 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable global-require */
const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
Expand Down Expand Up @@ -29,58 +28,8 @@ if (env.stringified['process.env'].NODE_ENV !== '"production"') {
throw new Error('Production builds must have NODE_ENV=production.');
}

const isProduction = env.stringified['process.env'].NODE_ENV === '"production"';
const shouldUseSourceMap = isProduction && (process.env.GENERATE_SOURCEMAP !== 'false');

const cssFilenameTemplate = 'static/css/[name].[contenthash:8].css';

// common function to get style loaders
const getStyleLoaders = (preProcessor) => {
// importLoaders: See https://webpack.js.org/loaders/css-loader/#importloaders
let importLoaders = 1; // for postcss-loader
if (preProcessor) {
importLoaders += 1; // for preProcessor
}

let inlineStyleLoader = require.resolve('style-loader');
if (isProduction) {
// Output CSS files, and rewrite paths relative from CSS dir
const cssRelativePath = Array(cssFilenameTemplate.split('/').length).join('../');
inlineStyleLoader = {
loader: MiniCssExtractPlugin.loader,
options: { publicPath: cssRelativePath },
};
}

const loaders = [
inlineStyleLoader,
{
loader: require.resolve('css-loader'),
options: { importLoaders },
},
{
// Options for PostCSS as we reference these options twice
// Adds vendor prefixing based on your specified browser support in
// package.json
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebook/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
autoprefixer({
flexbox: 'no-2009',
}),
],
sourceMap: shouldUseSourceMap,
},
},
];
if (preProcessor) {
loaders.push(require.resolve(preProcessor));
}
return loaders;
};
const cssRelativePath = Array(cssFilenameTemplate.split('/').length).join('../');

const resolveAlias = {
// TODO: Track this issue
Expand Down Expand Up @@ -232,24 +181,11 @@ module.exports = {
}],
},
{
test: /\.scss$/,
use: getStyleLoaders('sass-loader'),
},
// The notation here is somewhat confusing.
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader normally turns CSS into JS modules injecting <style>,
// but unlike in development configuration, we do something different.
// `ExtractTextPlugin` first applies the "postcss" and "css" loaders
// (second argument), then grabs the result CSS and puts it into a
// separate file in our build process. This way we actually ship
// a single CSS file in production instead of JS code injecting <style>
// tags. If you use code splitting, however, any async bundles will still
// use the "style" loader inside the async code so CSS from them won't be
// in the main CSS file.
{
test: /\.css$/,
use: getStyleLoaders(),
test: /\.s?css$/i,
use: [{
loader: MiniCssExtractPlugin.loader,
options: { publicPath: cssRelativePath }
}, 'css-loader', 'postcss-loader', 'sass-loader'],
},
// "file" loader makes sure assets end up in the `build` folder.
// When you `import` an asset, you get its filename.
Expand Down
Loading

0 comments on commit 093cdbc

Please sign in to comment.